diff --git a/ECD.py b/ECD.py index 1dbf198..495d6c8 100644 --- a/ECD.py +++ b/ECD.py @@ -1,13 +1,10 @@ import os import sys -import argparse sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'libs')) os.environ['PROJ_LIB'] = os.path.join(os.path.dirname(__file__), 'share/proj') os.environ['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'share') os.environ['ECD_BASEDIR'] = os.path.dirname(__file__) BASE_DIR = os.path.dirname(__file__) -import distutils -import distutils.version from rscder import MulStart import logging diff --git a/conda.yaml b/conda.yaml index 8cbf9a3..2ab197d 100644 --- a/conda.yaml +++ b/conda.yaml @@ -4,62 +4,30 @@ channels: - defaults dependencies: - cryptography=3.4.7=py37h20c650d_0 - - curl=7.79.0=h789b8ee_0 - - cycler=0.10.0=py_2 - - cytoolz=0.11.0=py37hcc03f2d_3 - dask-core=2021.9.1=pyhd8ed1ab_0 - decorator=5.1.0=pyhd8ed1ab_0 - future=0.18.2=py37h03978a9_3 - gdal=3.3.1=py37hb11e9a8_2 - - geos=3.9.1=h39d44d4_2 - - geotiff=1.6.0=ha8a8a2d_6 - - gettext=0.19.8.1=ha2e2712_1006 - - giflib=5.2.1=h8d14728_2 - - gsl=2.7=hdfb1a43_0 - - m2w64-gcc-libgfortran=5.3.0=6 - - m2w64-gcc-libs=5.3.0=7 - - m2w64-gcc-libs-core=5.3.0=7 - - m2w64-gmp=6.1.0=2 - - m2w64-libwinpthread-git=5.0.0.4634.697f757=2 - - markupsafe=2.0.1=py37hcc03f2d_0 - numpy=1.21.2=py37h940b05c_0 - opencv=4.5.3=py37h03978a9_1 - pip=21.2.4=pyhd8ed1ab_0 - proj=8.0.1=h1cfcee9_0 - - psycopg2=2.9.1=py37hd8e9650_0 - py-opencv=4.5.3=py37h4038f58_1 - pycodestyle=2.7.0=pyhd8ed1ab_0 - pycparser=2.20=pyh9f0ad1d_2 - pygments=2.10.0=pyhd8ed1ab_0 - pylint=2.11.1=pyhd8ed1ab_0 - pyproj=3.2.1=py37h9f67652_0 - - pyqt=5.12.3=py37h03978a9_7 - - pysnooper=0.5.0=pyhd8ed1ab_0 - - pysocks=1.7.1=py37h03978a9_3 - python=3.7.10=h7840368_101_cpython - python-dateutil=2.8.2=pyhd8ed1ab_0 - python_abi=3.7=2_cp37m - pytz=2021.1=pyhd8ed1ab_0 - pywavelets=1.1.1=py37hec80d1f_3 - - pywin32=301=py37hcc03f2d_0 - pyyaml=5.4.1=py37hcc03f2d_1 - qgis=3.18.3=py37h3dc7164_2 - qt=5.12.9=h5909a2a_4 - - qtkeychain=0.12.0=h552f0f6_0 - - qtlocation=5.12.9=ha925a31_0 - - qtpy=1.11.1=pyhd8ed1ab_0 - scikit-image=0.18.3=py37h9386db6_0 - scipy=1.7.1=py37hb6553fb_0 - - setuptools=58.0.4=py37h03978a9_1 - - six=1.16.0=pyh6c4a22f_0 - - snappy=1.1.8=ha925a31_3 - - sqlite=3.36.0=h8ffe710_1 - - tenacity=8.0.1=pyhd8ed1ab_0 - - typed-ast=1.4.3=py37hcc03f2d_0 - - typing-extensions=3.10.0.2=hd8ed1ab_0 - - typing_extensions=3.10.0.2=pyha770c72_0 - - ucrt=10.0.20348.0=h57928b3_0 - - urllib3=1.26.6=pyhd8ed1ab_0 - yaml=0.2.5=he774522_0 - pip: - attrs==21.4.0 diff --git a/lic/license.lic b/lic/license.lic index 02a42fd..fcdb940 100644 --- a/lic/license.lic +++ b/lic/license.lic @@ -1 +1 @@ -IieXktda+1nRK9zLwe87uPPn2VpCwmUrEOPfyenaW/Sek70/CqqbCr7nangL1+pVXSkzDELia7Qq8e+pDMuHCXzxyJOALRj4j3bhFVExwqSTLuXwdev1e26nr7vnECl7H0SCVynr8To7ciwcnmK6HJXre6i+mBdTjACmKseTMlWp480XOt7uHysltORbTA3J \ No newline at end of file +vd4FiYncytyziGH9GNCAA8hGGr1/79Xmphtc5+PHPJDpxvqj1hP7+985QMojYO4M5Qn/aqEAvFgeDN3CA8x1YAK8SdCgSXSBJpRBK8wqPQjBY1ak96QfdPCrTLunr+xuPxK3Gxe772adTTsee2+ot7WePYUsC4y4NcS5+rlP1if87xtYqVeSwx3c64cOmAGP \ No newline at end of file diff --git a/license.lic b/license.lic index 175477c..fcdb940 100644 --- a/license.lic +++ b/license.lic @@ -1 +1 @@ -pGZJMmJtule8fwDCz4mnyHoQa7N6pl5GRdLqfoXREBqG4Xb1jbvgf7RmC8f1+sNpiCFSIt7NgvU362tKhB5UBXn/vUAadG1lOGC70dUhprGzBoqJN7VkAHkNGg0XjoE8H0SCVynr8To7ciwcnmK6HJXre6i+mBdTjACmKseTMlWp480XOt7uHysltORbTA3J \ No newline at end of file +vd4FiYncytyziGH9GNCAA8hGGr1/79Xmphtc5+PHPJDpxvqj1hP7+985QMojYO4M5Qn/aqEAvFgeDN3CA8x1YAK8SdCgSXSBJpRBK8wqPQjBY1ak96QfdPCrTLunr+xuPxK3Gxe772adTTsee2+ot7WePYUsC4y4NcS5+rlP1if87xtYqVeSwx3c64cOmAGP \ No newline at end of file diff --git a/plugins/In_one/__init__.py b/plugins/In_one/__init__.py deleted file mode 100644 index 4df2afb..0000000 --- a/plugins/In_one/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from In_one.main import * \ No newline at end of file diff --git a/plugins/In_one/main.py b/plugins/In_one/main.py deleted file mode 100644 index f2ccb3f..0000000 --- a/plugins/In_one/main.py +++ /dev/null @@ -1,503 +0,0 @@ -from asyncio.windows_events import NULL -from concurrent.futures import thread -from email.policy import default -import os -import pdb -from threading import Thread -import numpy as np -# from plugins.basic_change.main import MyDialog -from rscder.gui.actions import ActionManager -from rscder.plugins.basic import BasicPlugin -from PyQt5.QtWidgets import QAction, QDialog, QHBoxLayout, QVBoxLayout, QPushButton,QWidget,QLabel,QLineEdit,QPushButton,QComboBox -from PyQt5.QtGui import QIcon,QPixmap -from PyQt5.QtCore import Qt -from rscder.gui.layercombox import LayerCombox,PairLayerCombox -from rscder.utils.icons import IconInstance -from rscder.utils.project import Project, RasterLayer, SingleBandRasterLayer,ResultPointLayer -from In_one.otsu import OTSU -from osgeo import gdal -from plugins.In_one import pic -import math -from skimage.filters import rank -from skimage.morphology import disk, rectangle -class LockerButton(QPushButton): - def __init__(self,parent=NULL): - super(LockerButton,self).__init__(parent) - m_imageLabel = QLabel(self) - m_imageLabel.setFixedWidth(20) - m_imageLabel.setScaledContents(True) - m_imageLabel.setStyleSheet("QLabel{background-color:transparent;}") - m_textLabel = QLabel(self) - m_textLabel.setStyleSheet("QLabel{background-color:transparent;}") - self.m_imageLabel=m_imageLabel - self.m_textLabel=m_textLabel - self.hide_=1 - mainLayout = QHBoxLayout() - - mainLayout.addWidget(self.m_imageLabel) - mainLayout.addWidget(self.m_textLabel) - mainLayout.setContentsMargins(0,0,0,0) - mainLayout.setSpacing(0) - self.setLayout(mainLayout) - def SetImageLabel(self, pixmap:QPixmap): - self.m_imageLabel.setPixmap(pixmap) - def SetTextLabel(self, text): - self.m_textLabel.setText(text) - -class selectCombox(QComboBox): - def __init__(self, parent,list:list,default='--') : - super(selectCombox,self).__init__(parent) - self.choose=None - self.list=list - self.default=default - self.addItem(default, None) - self.addItems(list) - self.currentIndexChanged.connect(self.on_change) - - def on_change(self,index): - if index == 0: - self.choose=self.default - else: - self.choose=self.list[index-1] - # print(self.choose) - -class AllInOne(QDialog): - def __init__(self, pre,cd,threshold,parent=None): - super(AllInOne, self).__init__(parent) - self.setWindowTitle('变化检测') - self.setWindowIcon(IconInstance().LOGO) - self.pre=pre#['均值滤波','test滤波'] - self.cd=cd#['差分法','test法'] - self.threshold=threshold#['OTSU'] - self.initUI() - - def initUI(self): - #图层 - self.layer_combox = PairLayerCombox(self) - layerbox = QHBoxLayout() - layerbox.addWidget(self.layer_combox) - - #预处理 - filterWeight=QWidget(self) - filterlayout=QVBoxLayout() - filerButton =LockerButton(filterWeight) - filerButton.setObjectName("filerButton") - filerButton.SetTextLabel("预处理") - filerButton.SetImageLabel(QPixmap('plugins/In_one/pic/箭头_列表展开.png')) - filerButton.setStyleSheet("#filerButton{background-color:transparent;border:none;}" - "#filerButton:hover{background-color:rgba(195,195,195,0.4);border:none;}") - self.pre_select=selectCombox(self,self.pre) - - x_size_input = QLineEdit(self) - x_size_input.setText('3') - y_size_input = QLineEdit(self) - y_size_input.setText('3') - size_label = QLabel(self) - size_label.setText('窗口大小:') - time_label = QLabel(self) - time_label.setText('X') - self.x_size_input = x_size_input - self.y_size_input = y_size_input - hlayout1 = QHBoxLayout() - hlayout1.addWidget(size_label) - hlayout1.addWidget(x_size_input) - hlayout1.addWidget(time_label) - hlayout1.addWidget(y_size_input) - vlayout = QVBoxLayout() - vlayout.addWidget(self.pre_select) - vlayout.addLayout(hlayout1) - filterWeight.setLayout(vlayout) - filterlayout.addWidget(filerButton) - filterlayout.addWidget(filterWeight) - #变化检测 - changelayout=QVBoxLayout() - changeWeight=QWidget(self) - changeButton =LockerButton(changeWeight) - changeButton.setObjectName("changeButton") - changeButton.SetTextLabel("变化检测") - changeButton.SetImageLabel(QPixmap('plugins/In_one/pic/箭头_列表展开.png')) - changeButton.setStyleSheet("#changeButton{background-color:transparent;border:none;}" - "#changeButton:hover{background-color:rgba(195,195,195,0.4);border:none;}") - changeWeightlayout=QVBoxLayout() - self.cd_select=selectCombox(self,self.cd) - changeWeightlayout.addWidget(self.cd_select) - changeWeight.setLayout(changeWeightlayout) - changelayout.addWidget(changeButton) - changelayout.addWidget(changeWeight) - - #阈值处理 - thresholdlayout=QVBoxLayout() - thresholdWeight=QWidget(self) - thresholdButton =LockerButton(thresholdWeight) - thresholdButton.setObjectName("thresholdButton") - thresholdButton.SetTextLabel("阈值处理") - thresholdButton.SetImageLabel(QPixmap('plugins/In_one/pic/箭头_列表展开.png')) - thresholdButton.setStyleSheet("#thresholdButton{background-color:transparent;border:none;}" - "#thresholdButton:hover{background-color:rgba(195,195,195,0.4);border:none;}") - self.threshold_select=selectCombox(self,self.threshold,default='手动阈值') - self.threshold_input=QLineEdit(self) - self.threshold_input.setText('0.5') - self.threshold_select.currentIndexChanged.connect(lambda index:self.hide_(self.threshold_input,index==0)) - thresholdWeightlayout=QVBoxLayout() - thresholdWeightlayout.addWidget(self.threshold_select) - thresholdWeightlayout.addWidget(self.threshold_input) - - thresholdWeight.setLayout(thresholdWeightlayout) - thresholdlayout.addWidget(thresholdButton) - thresholdlayout.addWidget(thresholdWeight) - - #确认 - oklayout=QHBoxLayout() - self.ok_button = QPushButton('确定', self) - self.ok_button.setIcon(IconInstance().OK) - self.ok_button.clicked.connect(self.accept) - - self.cancel_button = QPushButton('取消', self) - self.cancel_button.setIcon(IconInstance().CANCEL) - self.cancel_button.clicked.connect(self.reject) - oklayout.addWidget(self.ok_button) - oklayout.addWidget(self.cancel_button) - - totalvlayout=QVBoxLayout() - totalvlayout.addLayout(layerbox) - totalvlayout.addLayout(filterlayout) - totalvlayout.addLayout(changelayout) - totalvlayout.addLayout(thresholdlayout) - totalvlayout.addLayout(oklayout) - totalvlayout.addStretch() - - self.setLayout(totalvlayout) - - - filerButton.clicked.connect(lambda: self.hide(filerButton,filterWeight)) - changeButton.clicked.connect(lambda: self.hide(changeButton,changeWeight)) - thresholdButton.clicked.connect(lambda: self.hide(thresholdButton,thresholdWeight)) - - - - def hide(self,button:LockerButton,weight:QWidget): - if ((button.hide_)%2)==1: - weight.setVisible(False) - button.SetImageLabel(QPixmap('plugins/In_one/pic/箭头_列表向右.png')) - else: - weight.setVisible(True) - button.SetImageLabel(QPixmap('plugins/In_one/pic/箭头_列表展开.png')) - button.hide_=(button.hide_)%2+1 - def hide_(self,widget:QWidget,h:bool): - if h: - widget.setVisible(True) - else: - widget.setVisible(False) - def hideWidget(self,widget:QWidget): - if widget.isVisible: - widget.setVisible(False) - else: - widget.setVisible(True) -class InOnePlugin(BasicPlugin): - pre=['均值滤波'] - cd=['差分法'] - threshold=['OTSU阈值'] - - - @staticmethod - def info(): - return { - 'name': 'AllinOne', - 'description': 'AllinOne', - 'author': 'RSCDER', - 'version': '1.0.0', - } - - def set_action(self): - - basic_diff_method_in_one = QAction('差分法') - # ActionManager().change_detection_menu.addAction(basic_diff_method_in_one) - ActionManager().unsupervised_menu.addAction(basic_diff_method_in_one) - self.basic_diff_method_in_one = basic_diff_method_in_one - basic_diff_method_in_one.triggered.connect(self.run) - - - def run(self): - myDialog=AllInOne(self.pre,self.cd,self.threshold,self.mainwindow) - myDialog.show() - if myDialog.exec_()==QDialog.Accepted: - t=Thread(target=self.run_alg,args=(myDialog,)) - t.start() - - def run_alg(self,w:AllInOne): - dict={} - layer1=w.layer_combox.layer1 - layer2=w.layer_combox.layer2 - if not layer1.compare(layer2): - self.send_message.emit('两个图层的尺寸不同') - return - pth1 = w.layer_combox.layer1.path - pth2 = w.layer_combox.layer2.path - name=layer1.layer_parent.name - if w.pre_select.choose==self.pre[0]: - - pth1=Meanfilter(w.x_size_input.text(),w.y_size_input.text(),w.layer_combox.layer1) - self.send_message.emit('均值滤波图像{}'.format(w.layer_combox.layer1.name)) - pth2=Meanfilter(w.x_size_input.text(),w.y_size_input.text(),w.layer_combox.layer2) - self.send_message.emit('均值滤波图像{}'.format(w.layer_combox.layer2.name)) - name=name+'_mean_filter' - dict['预处理']=['均值滤波','|'.format(pth1,pth2)] - else: - pass - - cdpth=None - if w.cd_select.choose==self.cd[0]: - cdpth=basic_cd(pth1,pth2,w.layer_combox.layer1.layer_parent,self.send_message) - name += '_basic_cd' - dict['变化检测算法']=['差分法',cdpth] - else: - pass - - thpth=None - if w.threshold_select.choose==self.threshold[0]: - thpth,gap=otsu(cdpth,w.layer_combox.layer1.layer_parent.name,self.send_message) - name+='_otsu' - dict['后处理']=['OTSU阈值',gap,cdpth] - elif w.threshold_select.choose=='手动阈值': - thpth=thresh(cdpth,float(w.threshold_input.text()),w.layer_combox.layer1.layer_parent.name,self.send_message) - dict['后处理']=['手动阈值',[float(w.threshold_input.text())],thpth] - else: - pass - - table_layer(thpth,layer1,name,self.send_message,dict) - -def Meanfilter(x_size,y_size,layer:RasterLayer): - x_size = int(x_size) - y_size = int(y_size) - pth = layer.path - if pth is None: - return - - ds = gdal.Open(pth) - band_count = ds.RasterCount - out_path = os.path.join(Project().other_path, '{}_mean_filter.tif'.format(layer.name)) - out_ds = gdal.GetDriverByName('GTiff').Create(out_path, ds.RasterXSize, ds.RasterYSize, band_count, ds.GetRasterBand(1).DataType) - out_ds.SetProjection(ds.GetProjection()) - out_ds.SetGeoTransform(ds.GetGeoTransform()) - - for i in range(band_count): - band = ds.GetRasterBand(i+1) - data = band.ReadAsArray() - - data = rank.mean(data, rectangle(y_size, x_size)) - - out_band = out_ds.GetRasterBand(i+1) - out_band.WriteArray(data) - - out_ds.FlushCache() - del out_ds - del ds - return out_path - -def basic_cd(pth1,pth2,layer_parent,send_message): - - ds1 = gdal.Open(pth1) - ds2 = gdal.Open(pth2) - cell_size = layer_parent.cell_size - xsize = ds1.RasterXSize - ysize = ds1.RasterYSize - band = ds1.RasterCount - yblocks = ysize // cell_size[1] - - driver = gdal.GetDriverByName('GTiff') - out_tif = os.path.join(Project().cmi_path, 'temp.tif') - out_ds = driver.Create(out_tif, xsize, ysize, 1, gdal.GDT_Float32) - out_ds.SetGeoTransform(ds1.GetGeoTransform()) - out_ds.SetProjection(ds1.GetProjection()) - max_diff = 0 - min_diff = math.inf - for j in range(yblocks + 1): - - send_message.emit(f'计算{j}/{yblocks}') - block_xy = (0, j * cell_size[1]) - if block_xy[1] > ysize: - break - block_size = (xsize, cell_size[1]) - if block_xy[1] + block_size[1] > ysize: - block_size = (xsize, ysize - block_xy[1]) - block_data1 = ds1.ReadAsArray(*block_xy, *block_size) - block_data2 = ds2.ReadAsArray(*block_xy, *block_size) - - if band == 1: - block_data1 = block_data1[None, ...] - block_data2 = block_data2[None, ...] - # pdb.set_trace() - block_diff = block_data1.sum(0) - block_data2.sum(0) - block_diff = block_diff.astype(np.float32) - block_diff = np.abs(block_diff) - - min_diff = min(min_diff, block_diff[block_diff > 0].min()) - max_diff = max(max_diff, block_diff.max()) - out_ds.GetRasterBand(1).WriteArray(block_diff, *block_xy) - - send_message.emit(f'完成{j}/{yblocks}') - - out_ds.FlushCache() - del out_ds - send_message.emit('归一化概率中...') - temp_in_ds = gdal.Open(out_tif) - - out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) - out_normal_ds = driver.Create(out_normal_tif, xsize, ysize, 1, gdal.GDT_Byte) - out_normal_ds.SetGeoTransform(ds1.GetGeoTransform()) - out_normal_ds.SetProjection(ds1.GetProjection()) - # hist = np.zeros(256, dtype=np.int32) - for j in range(yblocks+1): - block_xy = (0, j * cell_size[1]) - if block_xy[1] > ysize: - break - block_size = (xsize, cell_size[1]) - if block_xy[1] + block_size[1] > ysize: - block_size = (xsize, ysize - block_xy[1]) - block_data = temp_in_ds.ReadAsArray(*block_xy, *block_size) - block_data = (block_data - min_diff) / (max_diff - min_diff) * 255 - block_data = block_data.astype(np.uint8) - out_normal_ds.GetRasterBand(1).WriteArray(block_data, *block_xy) - # hist_t, _ = np.histogram(block_data, bins=256, range=(0, 256)) - # hist += hist_t - # print(hist) - del temp_in_ds - del out_normal_ds - try: - os.remove(out_tif) - except: - pass - - # raster_result_layer = SingleBandRasterLayer(None, True, out_normal_tif, BasicLayer.BOATH_VIEW) - - # layer1.layer_parent.add_result_layer(point_result_lalyer) - # layer1.layer_parent.add_result_layer(raster_result_layer) - - # self.send_message.emit('完成计算变化表格') - - send_message.emit('差分法计算完成') - return out_normal_tif - -def otsu(pth,name,send_message): - ds = gdal.Open(pth) - band = ds.GetRasterBand(1) - # band_count = ds.RasterCount - - hist = np.zeros(256, dtype=np.int) - xsize = ds.RasterXSize - ysize = ds.RasterYSize - - max_pixels = 1e7 - max_rows = max_pixels // xsize - if max_rows < 1: - max_rows = 1 - if max_rows > ysize: - max_rows = ysize - block_count = ysize // max_rows + 1 - for i in range(block_count): - start_row = i * max_rows - end_row = min((i + 1) * max_rows, ysize) - block = band.ReadAsArray(0, start_row, xsize, end_row - start_row) - hist += np.histogram(block.flatten(), bins=256, range=(0, 255))[0] - hist = hist.astype(np.float32) - gap = OTSU(hist) - send_message.emit('阈值为:{}'.format(gap)) - - out_th = os.path.join(Project().bcdm_path, '{}_otsu_bcdm.tif'.format(name)) - out_ds = gdal.GetDriverByName('GTiff').Create(out_th, xsize, ysize, 1, gdal.GDT_Byte) - out_ds.SetGeoTransform(ds.GetGeoTransform()) - out_ds.SetProjection(ds.GetProjection()) - out_band = out_ds.GetRasterBand(1) - - for i in range(block_count): - start_row = i * max_rows - end_row = min((i + 1) * max_rows, ysize) - block = band.ReadAsArray(0, start_row, xsize, end_row - start_row) - out_band.WriteArray(block > gap, 0, start_row) - out_band.FlushCache() - out_ds = None - ds = None - send_message.emit('OTSU阈值完成') - return out_th,gap - #otsu_layer = SingleBandRasterLayer(path = out_th, style_info={}) - #layer.layer_parent.add_result_layer(otsu_layer) - -def thresh(pth,gap,name,send_message): - ds = gdal.Open(pth) - band = ds.GetRasterBand(1) - # band_count = ds.RasterCount - - - xsize = ds.RasterXSize - ysize = ds.RasterYSize - - max_pixels = 1e7 - max_rows = max_pixels // xsize - if max_rows < 1: - max_rows = 1 - if max_rows > ysize: - max_rows = ysize - block_count = ysize // max_rows + 1 - # for i in range(block_count): - # start_row = i * max_rows - # end_row = min((i + 1) * max_rows, ysize) - # block = band.ReadAsArray(0, start_row, xsize, end_row - start_row) - # hist += np.histogram(block.flatten(), bins=256, range=(0, 255))[0] - # hist = hist.astype(np.float32) - send_message.emit('阈值为:{}'.format(gap)) - - out_th = os.path.join(Project().bcdm_path, '{}_thresh{}_bcdm.tif'.format(name,gap)) - out_ds = gdal.GetDriverByName('GTiff').Create(out_th, xsize, ysize, 1, gdal.GDT_Byte) - out_ds.SetGeoTransform(ds.GetGeoTransform()) - out_ds.SetProjection(ds.GetProjection()) - out_band = out_ds.GetRasterBand(1) - - for i in range(block_count): - start_row = i * max_rows - end_row = min((i + 1) * max_rows, ysize) - block = band.ReadAsArray(0, start_row, xsize, end_row - start_row) - out_band.WriteArray(block > gap, 0, start_row) - out_band.FlushCache() - out_ds = None - ds = None - send_message.emit('自定义阈值分割完成') - return out_th - #otsu_layer = SingleBandRasterLayer(path = out_th, style_info={}) - #layer.layer_parent.add_result_layer(otsu_layer) - -def table_layer(pth,layer,name,send_message,dict): - send_message.emit('正在计算表格结果...') - cell_size = layer.layer_parent.cell_size - ds = gdal.Open(pth) - xsize = ds.RasterXSize - ysize = ds.RasterYSize - geo = ds.GetGeoTransform() - - out_csv = os.path.join(Project().other_path, f'{name}_table_result.csv') - yblocks = ysize // cell_size[1] + 1 - xblocks = xsize // cell_size[0] + 1 - with open(out_csv, 'w') as f: - f.write('x,y,diff,status\n') - for j in range(yblocks): - block_xy = (0, j * cell_size[1]) - block_size = (xsize, cell_size[1]) - if block_xy[1] + block_size[1] > ysize: - block_size = (xsize, ysize - block_xy[1]) - block_data = ds.ReadAsArray(*block_xy, *block_size) - for i in range(xblocks): - start_x = i * cell_size[0] - end_x = start_x + cell_size[0] - if end_x > xsize: - end_x = xsize - block_data_xy = block_data[:, start_x:end_x] - - center_x = start_x + cell_size[0] // 2 - center_y = j * cell_size[1] + cell_size[1] // 2 - center_x = center_x * geo[1] + geo [0] - center_y = center_y * geo[5] + geo [3] - f.write(f'{center_x},{center_y},{block_data_xy.mean() * 100},{int(block_data_xy.mean() > 0.5)}\n') - - result_layer = ResultPointLayer(out_csv, enable=True, proj=layer.proj, geo=layer.geo,result_path=dict) - # print(result_layer.result_path) - layer.layer_parent.add_result_layer(result_layer) - send_message.emit('计算完成') diff --git a/plugins/In_one/otsu.py b/plugins/In_one/otsu.py deleted file mode 100644 index 962075f..0000000 --- a/plugins/In_one/otsu.py +++ /dev/null @@ -1,42 +0,0 @@ -import numpy as np - -def OTSU(hist): - - u1=0.0#背景像素的平均灰度值 - u2=0.0#前景像素的平均灰度值 - th=0.0 - - #总的像素数目 - PixSum= np.sum(hist) - #各灰度值所占总像素数的比例 - PixRate=hist / PixSum - #统计各个灰度值的像素个数 - Max_var = 0 - #确定最大类间方差对应的阈值 - GrayScale = len(hist) - for i in range(1,len(hist)):#从1开始是为了避免w1为0. - u1_tem=0.0 - u2_tem=0.0 - #背景像素的比列 - w1=np.sum(PixRate[:i]) - #前景像素的比例 - w2=1.0-w1 - if w1==0 or w2==0: - pass - else:#背景像素的平均灰度值 - for m in range(i): - u1_tem=u1_tem+PixRate[m]*m - u1 = u1_tem * 1.0 / w1 - #前景像素的平均灰度值 - for n in range(i,GrayScale): - u2_tem = u2_tem + PixRate[n]*n - u2 = u2_tem / w2 - #print(u1) - #类间方差公式:G=w1*w2*(u1-u2)**2 - tem_var=w1*w2*np.power((u1-u2),2) - #print(tem_var) - #判断当前类间方差是否为最大值。 - if Max_var \ No newline at end of file diff --git a/plugins/In_one/pic/箭头 右.svg b/plugins/In_one/pic/箭头 右.svg deleted file mode 100644 index 2060636..0000000 --- a/plugins/In_one/pic/箭头 右.svg +++ /dev/null @@ -1,2 +0,0 @@ - \ No newline at end of file diff --git a/plugins/In_one/pic/箭头_列表向右.png b/plugins/In_one/pic/箭头_列表向右.png deleted file mode 100644 index d35ae74..0000000 Binary files a/plugins/In_one/pic/箭头_列表向右.png and /dev/null differ diff --git a/plugins/In_one/pic/箭头_列表展开.png b/plugins/In_one/pic/箭头_列表展开.png deleted file mode 100644 index 86a5b19..0000000 Binary files a/plugins/In_one/pic/箭头_列表展开.png and /dev/null differ diff --git a/plugins/change_rate/main.py b/plugins/change_rate/main.py index e968ffe..a61fea8 100644 --- a/plugins/change_rate/main.py +++ b/plugins/change_rate/main.py @@ -1,9 +1,10 @@ import os +from pickle import TRUE from threading import Thread from rscder.gui.actions import ActionManager from rscder.gui.layercombox import ResultPointLayerCombox from rscder.plugins.basic import BasicPlugin -from PyQt5.QtWidgets import QAction, QDialog, QLabel, QHBoxLayout, QVBoxLayout, QPushButton,QSlider,QSpinBox,QSpacerItem +from PyQt5.QtWidgets import QAction, QDialog, QLabel, QHBoxLayout, QVBoxLayout, QPushButton,QSlider,QSpinBox,QSpacerItem,QDialogButtonBox from PyQt5.QtCore import pyqtSignal,Qt from PyQt5.QtGui import QIcon from rscder.utils.icons import IconInstance @@ -36,19 +37,20 @@ class RateSetdialog(QDialog): self.ok_button = QPushButton('确定', self) self.ok_button.setIcon(IconInstance().OK) self.ok_button.clicked.connect(self.on_ok) - + self.ok_button.setDefault(True) self.cancel_button = QPushButton('取消', self) self.cancel_button.setIcon(IconInstance().CANCEL) self.cancel_button.clicked.connect(self.on_cancel) - - self.button_layout = QHBoxLayout() - self.button_layout.addWidget(self.ok_button) - self.button_layout.addWidget(self.cancel_button) + self.cancel_button.setDefault(False) + self.buttonbox=QDialogButtonBox(self) + self.buttonbox.addButton(self.ok_button,QDialogButtonBox.NoRole) + self.buttonbox.addButton(self.cancel_button,QDialogButtonBox.NoRole) + self.buttonbox.setCenterButtons(True) vlayout=QVBoxLayout() vlayout.addLayout(h1) vlayout.addWidget(QLabel('设置阈值')) vlayout.addLayout(h2) - vlayout.addLayout(self.button_layout) + vlayout.addWidget(self.buttonbox) self.setLayout(vlayout) self.old_data = None diff --git a/plugins/evaluation/main.py b/plugins/evaluation/main.py index 5137f0d..46b4242 100644 --- a/plugins/evaluation/main.py +++ b/plugins/evaluation/main.py @@ -7,7 +7,7 @@ import numpy as np from rscder.gui.actions import ActionManager from rscder.plugins.basic import BasicPlugin from rscder.gui.layercombox import RasterLayerCombox,ResultLayercombox, ResultPointLayerCombox -from PyQt5.QtWidgets import QAction, QFileDialog, QDialog, QLabel, QHBoxLayout, QVBoxLayout, QPushButton +from PyQt5.QtWidgets import QAction, QFileDialog, QDialog, QLabel, QHBoxLayout, QVBoxLayout, QPushButton,QDialogButtonBox from PyQt5.QtGui import QIcon from PyQt5.QtCore import Qt from osgeo import gdal @@ -49,14 +49,19 @@ class EvalutationDialog(QDialog): self.ok_button = QPushButton('确定', self) self.ok_button.setIcon(IconInstance().OK) self.ok_button.clicked.connect(self.on_ok) - + self.ok_button.setDefault(True) self.cancel_button = QPushButton('取消', self) self.cancel_button.setIcon(IconInstance().CANCEL) self.cancel_button.clicked.connect(self.on_cancel) + self.cancel_button.setDefault(False) + self.buttonbox=QDialogButtonBox(self) + self.buttonbox.addButton(self.ok_button,QDialogButtonBox.NoRole) + self.buttonbox.addButton(self.cancel_button,QDialogButtonBox.NoRole) + self.buttonbox.setCenterButtons(True) self.button_layout = QHBoxLayout() - self.button_layout.addWidget(self.ok_button) - self.button_layout.addWidget(self.cancel_button) + self.button_layout.addWidget(self.ok_button,0,alignment=Qt.AlignHCenter) + self.button_layout.addLayout(self.cancel_button,0,alignment=Qt.AlignHCenter) self.main_layout = QVBoxLayout() self.main_layout.addLayout(hbox1) diff --git a/plugins/export_to/main.py b/plugins/export_to/main.py index 3eb1f15..5161dcf 100644 --- a/plugins/export_to/main.py +++ b/plugins/export_to/main.py @@ -5,6 +5,7 @@ from rscder.utils.project import Project, PairLayer, ResultPointLayer from rscder.plugins.basic import BasicPlugin from PyQt5.QtWidgets import QDialog, QHBoxLayout, QFileDialog, QComboBox, QVBoxLayout, QPushButton, QLabel, QLineEdit, QAction from PyQt5.QtGui import QIcon +from PyQt5.QtCore import Qt class ExportDialog(QDialog): def __init__(self, parent=None): @@ -60,9 +61,9 @@ class ExportDialog(QDialog): hbox2.addWidget(out_path_btn) hbox3 = QHBoxLayout() - hbox3.addWidget(ok_btn) - hbox3.addWidget(cancel_btn) - + hbox3.addWidget(ok_btn,0,alignment=Qt.AlignHCenter) + hbox3.addWidget(cancel_btn,0,alignment=Qt.AlignHCenter) + vbox = QVBoxLayout() vbox.addLayout(hbox1) vbox.addLayout(hbox2) diff --git a/plugins/filter_collection/__init__.py b/plugins/filter_collection/__init__.py new file mode 100644 index 0000000..b826e77 --- /dev/null +++ b/plugins/filter_collection/__init__.py @@ -0,0 +1,5 @@ +from misc import Register + +FILTER = Register('滤波处理算法') + +from filter_collection.main import * \ No newline at end of file diff --git a/plugins/some_filter/main.py b/plugins/filter_collection/main.py similarity index 59% rename from plugins/some_filter/main.py rename to plugins/filter_collection/main.py index 8a3342b..d5f5eef 100644 --- a/plugins/some_filter/main.py +++ b/plugins/filter_collection/main.py @@ -1,3 +1,4 @@ +from datetime import datetime import os from threading import Thread from PyQt5.QtWidgets import QDialog, QAction @@ -10,19 +11,98 @@ from rscder.plugins.basic import BasicPlugin from rscder.gui.layercombox import RasterLayerCombox from osgeo import gdal, gdal_array from skimage.filters import rank -from skimage.morphology import disk, rectangle +from skimage.morphology import rectangle +from filter_collection import FILTER +from misc import AlgFrontend + +@FILTER.register +class MainFilter(AlgFrontend): + + @staticmethod + def get_name(): + return '均值滤波' + + @staticmethod + def get_widget(parent=None): + widget = QtWidgets.QWidget(parent) + x_size_input = QtWidgets.QLineEdit(widget) + x_size_input.setText('3') + x_size_input.setValidator(QtGui.QIntValidator()) + x_size_input.setObjectName('xinput') + y_size_input = QtWidgets.QLineEdit(widget) + y_size_input.setValidator(QtGui.QIntValidator()) + y_size_input.setObjectName('yinput') + y_size_input.setText('3') + + size_label = QtWidgets.QLabel(widget) + size_label.setText('窗口大小:') + + time_label = QtWidgets.QLabel(widget) + time_label.setText('X') + + hlayout1 = QtWidgets.QHBoxLayout() + + hlayout1.addWidget(size_label) + hlayout1.addWidget(x_size_input) + hlayout1.addWidget(time_label) + hlayout1.addWidget(y_size_input) + + widget.setLayout(hlayout1) + + return widget + + @staticmethod + def get_params(widget:QtWidgets.QWidget=None): + if widget is None: + return dict(x_size=3, y_size=3) + + x_input = widget.findChild(QtWidgets.QLineEdit, 'xinput') + y_input = widget.findChild(QtWidgets.QLineEdit, 'yinput') + + if x_input is None or y_input is None: + return dict(x_size=3, y_size=3) + + x_size = int(x_input.text()) + y_size = int(y_input.text()) + + return dict(x_size=x_size, y_size=y_size) + + @staticmethod + def run_alg(pth, x_size, y_size, *args, **kargs): + x_size = int(x_size) + y_size = int(y_size) + # pth = layer.path + if pth is None: + return + + ds = gdal.Open(pth) + band_count = ds.RasterCount + + out_path = os.path.join(Project().other_path, 'mean_filter_{}.tif'.format(int(datetime.now().timestamp() * 1000))) + out_ds = gdal.GetDriverByName('GTiff').Create(out_path, ds.RasterXSize, ds.RasterYSize, band_count, ds.GetRasterBand(1).DataType) + out_ds.SetProjection(ds.GetProjection()) + out_ds.SetGeoTransform(ds.GetGeoTransform()) + + for i in range(band_count): + band = ds.GetRasterBand(i+1) + data = band.ReadAsArray() + + data = rank.mean(data, rectangle(y_size, x_size)) + + out_band = out_ds.GetRasterBand(i+1) + out_band.WriteArray(data) + + out_ds.FlushCache() + del out_ds + del ds + return out_path + class FilterSetting(QDialog): def __init__(self, parent=None): super(FilterSetting, self).__init__(parent) self.setWindowTitle('滤波设置') - # self.setWindowFlags(Qt.WindowStaysOnTopHint) - # self.setFixedSize(300, 200) - # self.setStyleSheet("QDialog{background-color:rgb(255,255,255);}") self.setWindowIcon(IconInstance().FILTER) - # self.setWindowIconText('Filter Setting') - # self.setWindowModality(Qt.ApplicationModal) self.initUI() - # self.show() def initUI(self): self.layer_combox = RasterLayerCombox(self) @@ -61,8 +141,8 @@ class FilterSetting(QDialog): cancel_button.clicked.connect(self.reject) hlayout2 = QtWidgets.QHBoxLayout() - hlayout2.addWidget(ok_button) - hlayout2.addWidget(cancel_button) + hlayout2.addWidget(ok_button,0,alignment=Qt.AlignHCenter) + hlayout2.addWidget(cancel_button,0,alignment=Qt.AlignHCenter) vlayout = QtWidgets.QVBoxLayout() vlayout.addLayout(hbox) @@ -78,10 +158,10 @@ class MainPlugin(BasicPlugin): @staticmethod def info(): return { - 'name': 'mean_filter', + 'name': 'FilterCollection', 'author': 'rscder', 'version': '0.0.1', - 'description': 'Mean Filter' + 'description': 'Filter Collections' } def set_action(self): diff --git a/plugins/follow/__init__.py b/plugins/follow/__init__.py new file mode 100644 index 0000000..388f667 --- /dev/null +++ b/plugins/follow/__init__.py @@ -0,0 +1,5 @@ +from misc import Register + +FOLLOW = Register('流程') + +from follow.main import * \ No newline at end of file diff --git a/plugins/follow/main.py b/plugins/follow/main.py new file mode 100644 index 0000000..c44d481 --- /dev/null +++ b/plugins/follow/main.py @@ -0,0 +1,165 @@ +from functools import partial +from threading import Thread +from rscder.plugins.basic import BasicPlugin +from rscder.utils.icons import IconInstance +from rscder.gui.actions import ActionManager +from PyQt5 import QtWidgets, QtGui +from follow import FOLLOW +from misc import AlgFrontend + +class FollowDialog(QtWidgets.QDialog): + + def __init__(self, parent=None, alg:AlgFrontend=None) -> None: + super().__init__(parent) + if alg is None: + return + self.setMinimumWidth(700) + # self.setMinimumHeight(500) + vbox = QtWidgets.QVBoxLayout() + + self.widget = alg.get_widget(self) + vbox.addWidget(self.widget) + + self.ok_button = QtWidgets.QPushButton('确定', self) + self.ok_button.setIcon(IconInstance().OK) + self.ok_button.clicked.connect(self.accept) + self.ok_button.setDefault(True) + + self.cancel_button = QtWidgets.QPushButton('取消', self) + self.cancel_button.setIcon(IconInstance().CANCEL) + self.cancel_button.clicked.connect(self.reject) + self.cancel_button.setDefault(False) + buttonbox= QtWidgets.QDialogButtonBox() + buttonbox.addButton(self.ok_button,QtWidgets.QDialogButtonBox.NoRole) + buttonbox.addButton(self.cancel_button,QtWidgets.QDialogButtonBox.NoRole) + buttonbox.setCenterButtons(True) + + vbox.addWidget(buttonbox) + vbox.addStretch() + + self.setLayout(vbox) + +class FollowPlugin(BasicPlugin): + + @staticmethod + def get_info(): + return { + 'name': 'Follow', + 'version': '1.0.0' + } + + + def set_action(self): + follow_box:QtWidgets.QWidget = ActionManager().follow_box + toolbar = ActionManager().add_toolbar('Follow') + vbox = QtWidgets.QVBoxLayout(follow_box) + + combox = QtWidgets.QComboBox(follow_box) + + # print(FOLLOW.keys()) + for key in FOLLOW.keys(): + alg:AlgFrontend = FOLLOW[key] + if alg.get_name() is None: + name = key + else: + name = alg.get_name() + combox.addItem(name, key) + + action = QtWidgets.QAction(alg.get_icon(), name, self.mainwindow) + func = partial(self.run_dialog, alg) + action.triggered.connect(func) + toolbar.addAction(action) + + + combox.currentIndexChanged.connect(self.on_change) + + vbox.addWidget(combox) + + self.current_widget = None + + + self.combox = combox + self.layout = vbox + + self.ok_button = QtWidgets.QPushButton('运行') + self.ok_button.setIcon(IconInstance().OK) + self.ok_button.clicked.connect(self.run) + self.ok_button.setDefault(True) + + self.cancel_button = QtWidgets.QPushButton('重置') + self.cancel_button.setIcon(IconInstance().CANCEL) + self.cancel_button.clicked.connect(self.reset) + self.cancel_button.setDefault(False) + buttonbox= QtWidgets.QDialogButtonBox() + buttonbox.addButton(self.ok_button,QtWidgets.QDialogButtonBox.NoRole) + buttonbox.addButton(self.cancel_button,QtWidgets.QDialogButtonBox.NoRole) + buttonbox.setCenterButtons(True) + + self.btn_box = buttonbox + follow_box.setLayout(vbox) + # vbox.addStretch() + self.on_change(0) + + def on_change(self, index): + + print(self.combox.currentData()) + if self.current_widget is not None: + self.current_widget.setParent(None) + self.btn_box.setParent(None) + self.layout.removeWidget(self.current_widget) + self.layout.removeWidget(self.btn_box) + self.current_widget = None + + alg:AlgFrontend = FOLLOW[self.combox.currentData()] + + if alg.get_widget() is None: + return + + self.current_widget = alg.get_widget(ActionManager().follow_box) + self.layout.addWidget(self.current_widget) + self.layout.addWidget(self.btn_box) + + + def run(self): + alg:AlgFrontend = FOLLOW[self.combox.currentData()] + + if alg is None: + return + + params = alg.get_params(self.current_widget) + + t = Thread(target=self.run_alg, args=(params,)) + t.start() + + def run_dialog(self, alg:AlgFrontend): + + dialog = FollowDialog(self.mainwindow, alg) + dialog.show() + + if dialog.exec_() == QtWidgets.QDialog.Accepted: + + params = alg.get_params(dialog.widget) + + t = Thread(target=self.run_alg, args = (alg, params,)) + t.start() + + + def run_alg(self, alg:AlgFrontend, p): + + alg.run_alg(**p, send_message=self.send_message) + + def reset(self): + + if self.current_widget is None: + return + self.current_widget.setParent(None) + self.btn_box.setParent(None) + self.layout.removeWidget(self.current_widget) + self.layout.removeWidget(self.btn_box) + + self.current_widget = FOLLOW[self.combox.currentData()].get_widget(ActionManager().follow_box) + + self.layout.addWidget(self.current_widget) + self.layout.addLayout(self.btn_box) + + \ No newline at end of file diff --git a/plugins/misc/__init__.py b/plugins/misc/__init__.py new file mode 100644 index 0000000..3a85146 --- /dev/null +++ b/plugins/misc/__init__.py @@ -0,0 +1,3 @@ +from misc.main import * +from misc.utils import * +from misc.table_layer import * \ No newline at end of file diff --git a/plugins/misc/main.py b/plugins/misc/main.py new file mode 100644 index 0000000..cd4ba61 --- /dev/null +++ b/plugins/misc/main.py @@ -0,0 +1,92 @@ +from threading import Thread +from plugins.misc.utils import Register +from rscder.plugins.basic import BasicPlugin +from PyQt5.QtWidgets import QGroupBox, QWidget, QComboBox, QVBoxLayout + + +class MISCPlugin(BasicPlugin): + + @staticmethod + def info(): + return { + 'name': 'MISC Plugin', + 'description': '基本开发工具', + 'author': 'Wangtong', + 'version': '1.0.0', + } + + def set_action(self): + pass + + +class AlgFrontend(object): + + @staticmethod + def get_name(): + return None + + @staticmethod + def get_icon(): + return None + + @staticmethod + def get_widget(parent=None): + return QWidget(parent) + + @staticmethod + def get_params(widget=None): + return dict() + + @staticmethod + def run_alg(*args, **kargs): + pass + + +class AlgSelectWidget(QGroupBox): + + def __init__(self, parent= None, registery:Register = None) -> None: + super().__init__(parent) + self.reg = registery + if registery is None: + return + self.setTitle(registery.name) + self.selectbox = QComboBox(self) + self.selectbox.addItem('--', None) + for key in self.reg.keys(): + alg:AlgFrontend = self.reg[key] + if alg.get_name() is None: + name = key + else: + name = alg.get_name() + self.selectbox.addItem(name, key) + + self.vbox = QVBoxLayout(self) + self.vbox.addWidget(self.selectbox) + + self.params_widget = QWidget() + self.vbox.addWidget(self.params_widget) + + self.selectbox.currentIndexChanged.connect(self.on_changed) + + def on_changed(self, index): + if index == 0: + self.alg = None + self.params_widget.setParent(None) + self.vbox.removeWidget(self.params_widget) + self.params_widget = QWidget(self) + self.vbox.addWidget(self.params_widget) + return + + self.alg:AlgFrontend = self.reg[self.selectbox.itemData(index)] + self.params_widget.setParent(None) + self.vbox.removeWidget(self.params_widget) + self.params_widget = self.alg.get_widget(self) + self.vbox.addWidget(self.params_widget) + + + + def get_alg_and_params(self): + if self.selectbox.currentIndex() == 0: + return None, None + + return self.alg, self.alg.get_params(self.params_widget) \ No newline at end of file diff --git a/plugins/misc/table_layer.py b/plugins/misc/table_layer.py new file mode 100644 index 0000000..f3d0f70 --- /dev/null +++ b/plugins/misc/table_layer.py @@ -0,0 +1,46 @@ +from datetime import datetime +import math +from random import random +from osgeo import gdal +from rscder.utils.project import Project +import os +from rscder.utils.project import BasicLayer, ResultPointLayer + +def table_layer(pth:str,layer:BasicLayer, name, send_message = None): + if send_message is not None: + send_message.emit('正在计算表格结果...') + cell_size = layer.layer_parent.cell_size + ds = gdal.Open(pth) + xsize = ds.RasterXSize + ysize = ds.RasterYSize + geo = ds.GetGeoTransform() + + out_csv = os.path.join(Project().other_path, f'{name}_table_result_{ int(datetime.now().timestamp() * 1000) }.csv') + yblocks = ysize // cell_size[1] + 1 + xblocks = xsize // cell_size[0] + 1 + with open(out_csv, 'w') as f: + f.write('x,y,diff,status\n') + for j in range(yblocks): + block_xy = (0, j * cell_size[1]) + block_size = (xsize, cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + block_data = ds.ReadAsArray(*block_xy, *block_size) + for i in range(xblocks): + start_x = i * cell_size[0] + end_x = start_x + cell_size[0] + if end_x > xsize: + end_x = xsize + block_data_xy = block_data[:, start_x:end_x] + + center_x = start_x + cell_size[0] // 2 + center_y = j * cell_size[1] + cell_size[1] // 2 + center_x = center_x * geo[1] + geo [0] + center_y = center_y * geo[5] + geo [3] + f.write(f'{center_x},{center_y},{block_data_xy.mean() * 100},{int(block_data_xy.mean() > 0.5)}\n') + + result_layer = ResultPointLayer(out_csv, enable=True, proj=layer.proj, geo=layer.geo,result_path={}) + # print(result_layer.result_path) + layer.layer_parent.add_result_layer(result_layer) + if send_message is not None: + send_message.emit('计算完成') \ No newline at end of file diff --git a/plugins/misc/utils.py b/plugins/misc/utils.py new file mode 100644 index 0000000..311f457 --- /dev/null +++ b/plugins/misc/utils.py @@ -0,0 +1,46 @@ +import os +import random +import logging +# def generate_temp_file + +class Register: + + def __init__(self, registry_name): + self._dict = {} + self._name = registry_name + + @property + def name(self): + return self._name + + def __setitem__(self, key, value): + if not callable(value): + raise Exception(f"Value of a Registry must be a callable!\nValue: {value}") + if key is None: + key = value.__name__ + if key in self._dict: + logging.warning("Key %s already in registry %s." % (key, self._name)) + self._dict[key] = value + + def register(self, target): + """Decorator to register a function or class.""" + + def add(key, value): + self[key] = value + return value + + if callable(target): + # @reg.register + return add(None, target) + # @reg.register('alias') + return lambda x: add(target, x) + + def __getitem__(self, key): + return self._dict[key] + + def __contains__(self, key): + return key in self._dict + + def keys(self): + """key""" + return self._dict.keys() \ No newline at end of file diff --git a/plugins/plugins.yaml b/plugins/plugins.yaml index 43de036..f98b865 100644 --- a/plugins/plugins.yaml +++ b/plugins/plugins.yaml @@ -13,11 +13,11 @@ path: ./plugin\export_to version: 1.0.0 - author: RSCDER - description: MeanFilter + description: FilterCollection enabled: true - module: some_filter - name: MeanFilter - path: ./plugin\some_filter + module: filter_collection + name: FilterCollection + path: ./plugin\filter_collection version: 1.0.0 - author: RSCDER description: Evaluation @@ -27,11 +27,18 @@ path: ./plugin\evaluation version: 1.0.0 - author: RSCDER - description: AllinOne + description: UnsupervisedPlugin enabled: true - module: In_one - name: basic_diff_AllinOne - path: ./plugin\In_one + module: unsupervised_method + name: UnsupervisedPlugin + path: ./plugin\unsupervsied_method + version: 1.0.0 +- author: RSCDER + description: VegatationPlugin + enabled: true + module: veg_method + name: VegatationPlugin + path: ./plugin\veg_method version: 1.0.0 - author: RSCDER description: set Change Rate @@ -39,4 +46,11 @@ module: change_rate name: set_change_rate path: ./plugin\change_rate + version: 1.0.0 +- author: RSCDER + description: Follow box + enabled: true + module: follow + name: FollowPlugin + path: ./plugin\follow version: 1.0.0 \ No newline at end of file diff --git a/plugins/some_filter/__init__.py b/plugins/some_filter/__init__.py deleted file mode 100644 index 396c649..0000000 --- a/plugins/some_filter/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from some_filter.main import * \ No newline at end of file diff --git a/plugins/thres/__init__.py b/plugins/thres/__init__.py new file mode 100644 index 0000000..b5bcc0b --- /dev/null +++ b/plugins/thres/__init__.py @@ -0,0 +1,5 @@ +from misc import Register + +THRES = Register('阈值方法') + +from thres.main import * \ No newline at end of file diff --git a/plugins/thres/main.py b/plugins/thres/main.py new file mode 100644 index 0000000..9ae8537 --- /dev/null +++ b/plugins/thres/main.py @@ -0,0 +1,178 @@ +from osgeo import gdal, gdalconst +from rscder.utils.project import Project +import os +from misc import AlgFrontend +from thres import THRES +from PyQt5.QtWidgets import QWidget, QLabel, QHBoxLayout, QLineEdit +from PyQt5.QtGui import QIntValidator, QDoubleValidator + +@THRES.register +class ManulGapAlg(AlgFrontend): + + @staticmethod + def get_name(): + return '手动阈值' + + @staticmethod + def get_params(widget:QWidget=None): + if widget is None: + return dict(gap=125) + lineedit:QLineEdit = widget.layout().findChild(QLineEdit, 'lineedit') + if lineedit is None: + return dict(gap=125) + + gap = int(lineedit.text()) + + return dict(gap=gap) + @staticmethod + def get_widget(parent=None): + + widget = QWidget(parent) + lineedit = QLineEdit(widget) + lineedit.setObjectName('lineedit') + lineedit.setValidator(QIntValidator(1, 254)) + # lineedit. + label = QLabel('阈值:') + + layout = QHBoxLayout() + layout.addWidget(label) + layout.addWidget(lineedit) + + widget.setLayout(layout) + return widget + + + @staticmethod + def run_alg(pth,name = '',gap = 125, send_message = None): + + ds = gdal.Open(pth) + band = ds.GetRasterBand(1) + + xsize = ds.RasterXSize + ysize = ds.RasterYSize + + max_pixels = 1e7 + max_rows = max_pixels // xsize + if max_rows < 1: + max_rows = 1 + if max_rows > ysize: + max_rows = ysize + block_count = ysize // max_rows + 1 + + if send_message is not None: + send_message.emit('阈值为:{}'.format(gap)) + + out_th = os.path.join(Project().bcdm_path, '{}_thresh{}_bcdm.tif'.format(name,gap)) + out_ds = gdal.GetDriverByName('GTiff').Create(out_th, xsize, ysize, 1, gdal.GDT_Byte) + out_ds.SetGeoTransform(ds.GetGeoTransform()) + out_ds.SetProjection(ds.GetProjection()) + out_band = out_ds.GetRasterBand(1) + + for i in range(block_count): + start_row = i * max_rows + end_row = min((i + 1) * max_rows, ysize) + block = band.ReadAsArray(0, start_row, xsize, end_row - start_row) + out_band.WriteArray(block > gap, 0, start_row) + out_band.FlushCache() + out_ds = None + ds = None + if send_message is not None: + send_message.emit('自定义阈值分割完成') + return out_th + + +import numpy as np + +def OTSU(hist): + + u1=0.0#背景像素的平均灰度值 + u2=0.0#前景像素的平均灰度值 + th=0.0 + + #总的像素数目 + PixSum= np.sum(hist) + #各灰度值所占总像素数的比例 + PixRate=hist / PixSum + #统计各个灰度值的像素个数 + Max_var = 0 + #确定最大类间方差对应的阈值 + GrayScale = len(hist) + for i in range(1,len(hist)):#从1开始是为了避免w1为0. + u1_tem=0.0 + u2_tem=0.0 + #背景像素的比列 + w1=np.sum(PixRate[:i]) + #前景像素的比例 + w2=1.0-w1 + if w1==0 or w2==0: + pass + else:#背景像素的平均灰度值 + for m in range(i): + u1_tem=u1_tem+PixRate[m]*m + u1 = u1_tem * 1.0 / w1 + #前景像素的平均灰度值 + for n in range(i,GrayScale): + u2_tem = u2_tem + PixRate[n]*n + u2 = u2_tem / w2 + #print(u1) + #类间方差公式:G=w1*w2*(u1-u2)**2 + tem_var=w1*w2*np.power((u1-u2),2) + #print(tem_var) + #判断当前类间方差是否为最大值。 + if Max_var ysize: + max_rows = ysize + block_count = ysize // max_rows + 1 + for i in range(block_count): + start_row = i * max_rows + end_row = min((i + 1) * max_rows, ysize) + block = band.ReadAsArray(0, start_row, xsize, end_row - start_row) + hist += np.histogram(block.flatten(), bins=256, range=(0, 255))[0] + hist = hist.astype(np.float32) + gap = OTSU(hist) + send_message.emit('阈值为:{}'.format(gap)) + + out_th = os.path.join(Project().bcdm_path, '{}_otsu_bcdm.tif'.format(name)) + out_ds = gdal.GetDriverByName('GTiff').Create(out_th, xsize, ysize, 1, gdal.GDT_Byte) + out_ds.SetGeoTransform(ds.GetGeoTransform()) + out_ds.SetProjection(ds.GetProjection()) + out_band = out_ds.GetRasterBand(1) + + for i in range(block_count): + start_row = i * max_rows + end_row = min((i + 1) * max_rows, ysize) + block = band.ReadAsArray(0, start_row, xsize, end_row - start_row) + out_band.WriteArray(block > gap, 0, start_row) + out_band.FlushCache() + out_ds = None + ds = None + send_message.emit('OTSU阈值完成') + + return out_th + # ManulGapAlg.run_alg \ No newline at end of file diff --git a/plugins/unsupervised_method/__init__.py b/plugins/unsupervised_method/__init__.py new file mode 100644 index 0000000..c052402 --- /dev/null +++ b/plugins/unsupervised_method/__init__.py @@ -0,0 +1 @@ +from unsupervised_method.main import * \ No newline at end of file diff --git a/plugins/unsupervised_method/main.py b/plugins/unsupervised_method/main.py new file mode 100644 index 0000000..86fcdb5 --- /dev/null +++ b/plugins/unsupervised_method/main.py @@ -0,0 +1,227 @@ +from functools import partial +from threading import Thread +from plugins.misc.main import AlgFrontend +from rscder.gui.actions import ActionManager +from rscder.plugins.basic import BasicPlugin +from PyQt5.QtWidgets import QAction, QToolBar, QMenu, QDialog, QHBoxLayout, QVBoxLayout, QPushButton,QWidget,QLabel,QLineEdit,QPushButton,QComboBox,QDialogButtonBox + +from rscder.gui.layercombox import PairLayerCombox +from rscder.utils.icons import IconInstance +from filter_collection import FILTER +from .scripts import UNSUPER_CD +from thres import THRES +from misc import table_layer, AlgSelectWidget +from follow import FOLLOW + +class UnsupervisedCDMethod(QDialog): + def __init__(self,parent=None, alg:AlgFrontend=None): + super(UnsupervisedCDMethod, self).__init__(parent) + self.alg = alg + self.setWindowTitle('无监督变化检测:{}'.format(alg.get_name())) + self.setWindowIcon(IconInstance().LOGO) + self.initUI() + self.setMinimumWidth(500) + + def initUI(self): + #图层 + self.layer_combox = PairLayerCombox(self) + layerbox = QHBoxLayout() + layerbox.addWidget(self.layer_combox) + + self.filter_select = AlgSelectWidget(self, FILTER) + self.param_widget = self.alg.get_widget(self) + self.unsupervised_menu = self.param_widget + self.thres_select = AlgSelectWidget(self, THRES) + + self.ok_button = QPushButton('确定', self) + self.ok_button.setIcon(IconInstance().OK) + self.ok_button.clicked.connect(self.accept) + self.ok_button.setDefault(True) + + self.cancel_button = QPushButton('取消', self) + self.cancel_button.setIcon(IconInstance().CANCEL) + self.cancel_button.clicked.connect(self.reject) + self.cancel_button.setDefault(False) + buttonbox=QDialogButtonBox(self) + buttonbox.addButton(self.ok_button,QDialogButtonBox.NoRole) + buttonbox.addButton(self.cancel_button,QDialogButtonBox.NoRole) + buttonbox.setCenterButtons(True) + + totalvlayout=QVBoxLayout() + totalvlayout.addLayout(layerbox) + totalvlayout.addWidget(self.filter_select) + if self.param_widget is not None: + totalvlayout.addWidget(self.param_widget) + totalvlayout.addWidget(self.thres_select) + totalvlayout.addStretch(1) + hbox = QHBoxLayout() + hbox.addStretch(1) + hbox.addWidget(buttonbox) + totalvlayout.addLayout(hbox) + # totalvlayout.addStretch() + + self.setLayout(totalvlayout) + +@FOLLOW.register +class UnsupervisedCDFollow(AlgFrontend): + + @staticmethod + def get_name(): + return '无监督变化检测' + + @staticmethod + def get_icon(): + return IconInstance().UNSUPERVISED + + @staticmethod + def get_widget(parent=None): + widget = QWidget(parent) + layer_combox = PairLayerCombox(widget) + layer_combox.setObjectName('layer_combox') + + filter_select = AlgSelectWidget(widget, FILTER) + filter_select.setObjectName('filter_select') + unsupervised_select = AlgSelectWidget(widget, UNSUPER_CD) + unsupervised_select.setObjectName('unsupervised_select') + thres_select = AlgSelectWidget(widget, THRES) + thres_select.setObjectName('thres_select') + + totalvlayout=QVBoxLayout() + totalvlayout.addWidget(layer_combox) + totalvlayout.addWidget(filter_select) + totalvlayout.addWidget(unsupervised_select) + totalvlayout.addWidget(thres_select) + totalvlayout.addStretch() + + widget.setLayout(totalvlayout) + + return widget + + @staticmethod + def get_params(widget:QWidget=None): + if widget is None: + return dict() + + layer_combox = widget.findChild(PairLayerCombox, 'layer_combox') + filter_select = widget.findChild(AlgSelectWidget, 'filter_select') + unsupervised_select = widget.findChild(AlgSelectWidget, 'unsupervised_select') + thres_select = widget.findChild(AlgSelectWidget, 'thres_select') + + layer1=layer_combox.layer1 + pth1 = layer_combox.layer1.path + pth2 = layer_combox.layer2.path + + falg, fparams = filter_select.get_alg_and_params() + cdalg, cdparams = unsupervised_select.get_alg_and_params() + thalg, thparams = thres_select.get_alg_and_params() + + if cdalg is None or thalg is None: + return dict() + + return dict( + layer1=layer1, + pth1 = pth1, + pth2 = pth2, + falg = falg, + fparams = fparams, + cdalg = cdalg, + cdparams = cdparams, + thalg = thalg, + thparams = thparams, + ) + + @staticmethod + def run_alg(layer1=None, + pth1 = None, + pth2 = None, + falg = None, + fparams = None, + cdalg = None, + cdparams = None, + thalg = None, + thparams = None, + send_message = None): + + if cdalg is None or thalg is None: + return + + name = layer1.name + + if falg is not None: + pth1 = falg.run_alg(pth1, name=name, send_message= send_message, **fparams) + pth2 = falg.run_alg(pth2, name=name, send_message= send_message, **fparams) + + + cdpth = cdalg.run_alg(pth1, pth2, layer1.layer_parent, send_message= send_message,**cdparams) + thpth = thalg.run_alg(cdpth, name=name, send_message= send_message, **thparams) + + table_layer(thpth,layer1,name, send_message) + + + + +class UnsupervisedPlugin(BasicPlugin): + + + @staticmethod + def info(): + return { + 'name': 'UnsupervisedPlugin', + 'description': 'UnsupervisedPlugin', + 'author': 'RSCDER', + 'version': '1.0.0', + } + + def set_action(self): + unsupervised_menu = QMenu('&无监督变化检测', self.mainwindow) + unsupervised_menu.setIcon(IconInstance().UNSUPERVISED) + ActionManager().change_detection_menu.addMenu(unsupervised_menu) + + for key in UNSUPER_CD.keys(): + alg:AlgFrontend = UNSUPER_CD[key] + if alg.get_name() is None: + name = key + else: + name = alg.get_name() + + action = QAction(name, unsupervised_menu) + func = partial(self.run_cd, alg) + action.triggered.connect(func) + + unsupervised_menu.addAction(action) + + + def run_cd(self, alg): + print(alg.get_name()) + dialog = UnsupervisedCDMethod(self.mainwindow, alg) + dialog.show() + + if dialog.exec_() == QDialog.Accepted: + t = Thread(target=self.run_cd_alg, args=(dialog,)) + t.start() + + def run_cd_alg(self, w:UnsupervisedCDMethod): + + layer1=w.layer_combox.layer1 + pth1 = w.layer_combox.layer1.path + pth2 = w.layer_combox.layer2.path + name = layer1.layer_parent.name + + falg, fparams = w.filter_select.get_alg_and_params() + cdalg = w.alg + cdparams = w.alg.get_params(w.param_widget) + thalg, thparams = w.thres_select.get_alg_and_params() + + if cdalg is None or thalg is None: + return + + if falg is not None: + pth1 = falg.run_alg(pth1, name=name, send_message=self.send_message, **fparams) + pth2 = falg.run_alg(pth2, name=name, send_message=self.send_message, **fparams) + + + cdpth = cdalg.run_alg(pth1, pth2, layer1.layer_parent, send_message=self.send_message,**cdparams) + thpth = thalg.run_alg(cdpth, name=name, send_message=self.send_message, **thparams) + + table_layer(thpth,layer1,name,self.send_message) + \ No newline at end of file diff --git a/plugins/In_one/pic.py b/plugins/unsupervised_method/pic.py similarity index 100% rename from plugins/In_one/pic.py rename to plugins/unsupervised_method/pic.py diff --git a/plugins/unsupervised_method/readme.md b/plugins/unsupervised_method/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/plugins/unsupervised_method/scripts/ACD.py b/plugins/unsupervised_method/scripts/ACD.py new file mode 100644 index 0000000..885ef06 --- /dev/null +++ b/plugins/unsupervised_method/scripts/ACD.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _ACD +else: + import _ACD + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _ACD.CV_VERSION_MAJOR +CV_VERSION_MINOR = _ACD.CV_VERSION_MINOR +CV_VERSION_REVISION = _ACD.CV_VERSION_REVISION +CV_VERSION_STATUS = _ACD.CV_VERSION_STATUS +CV_VERSION = _ACD.CV_VERSION +CV_MAJOR_VERSION = _ACD.CV_MAJOR_VERSION +CV_MINOR_VERSION = _ACD.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _ACD.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_bool_generic_type + channels = _ACD.DataType_bool_channels + fmt = _ACD.DataType_bool_fmt + + def __init__(self): + _ACD.DataType_bool_swiginit(self, _ACD.new_DataType_bool()) + __swig_destroy__ = _ACD.delete_DataType_bool + +# Register DataType_bool in _ACD: +_ACD.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_uchar_generic_type + channels = _ACD.DataType_uchar_channels + fmt = _ACD.DataType_uchar_fmt + + def __init__(self): + _ACD.DataType_uchar_swiginit(self, _ACD.new_DataType_uchar()) + __swig_destroy__ = _ACD.delete_DataType_uchar + +# Register DataType_uchar in _ACD: +_ACD.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_schar_generic_type + channels = _ACD.DataType_schar_channels + fmt = _ACD.DataType_schar_fmt + + def __init__(self): + _ACD.DataType_schar_swiginit(self, _ACD.new_DataType_schar()) + __swig_destroy__ = _ACD.delete_DataType_schar + +# Register DataType_schar in _ACD: +_ACD.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_char_generic_type + channels = _ACD.DataType_char_channels + fmt = _ACD.DataType_char_fmt + + def __init__(self): + _ACD.DataType_char_swiginit(self, _ACD.new_DataType_char()) + __swig_destroy__ = _ACD.delete_DataType_char + +# Register DataType_char in _ACD: +_ACD.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_ushort_generic_type + channels = _ACD.DataType_ushort_channels + fmt = _ACD.DataType_ushort_fmt + + def __init__(self): + _ACD.DataType_ushort_swiginit(self, _ACD.new_DataType_ushort()) + __swig_destroy__ = _ACD.delete_DataType_ushort + +# Register DataType_ushort in _ACD: +_ACD.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_short_generic_type + channels = _ACD.DataType_short_channels + fmt = _ACD.DataType_short_fmt + + def __init__(self): + _ACD.DataType_short_swiginit(self, _ACD.new_DataType_short()) + __swig_destroy__ = _ACD.delete_DataType_short + +# Register DataType_short in _ACD: +_ACD.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_int_generic_type + channels = _ACD.DataType_int_channels + fmt = _ACD.DataType_int_fmt + + def __init__(self): + _ACD.DataType_int_swiginit(self, _ACD.new_DataType_int()) + __swig_destroy__ = _ACD.delete_DataType_int + +# Register DataType_int in _ACD: +_ACD.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_float_generic_type + channels = _ACD.DataType_float_channels + fmt = _ACD.DataType_float_fmt + + def __init__(self): + _ACD.DataType_float_swiginit(self, _ACD.new_DataType_float()) + __swig_destroy__ = _ACD.delete_DataType_float + +# Register DataType_float in _ACD: +_ACD.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_double_generic_type + channels = _ACD.DataType_double_channels + fmt = _ACD.DataType_double_fmt + + def __init__(self): + _ACD.DataType_double_swiginit(self, _ACD.new_DataType_double()) + __swig_destroy__ = _ACD.delete_DataType_double + +# Register DataType_double in _ACD: +_ACD.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD.Range_swiginit(self, _ACD.new_Range(*args)) + + def size(self): + return _ACD.Range_size(self) + + def empty(self): + return _ACD.Range_empty(self) + + @staticmethod + def all(): + return _ACD.Range_all() + start = property(_ACD.Range_start_get, _ACD.Range_start_set) + end = property(_ACD.Range_end_get, _ACD.Range_end_set) + __swig_destroy__ = _ACD.delete_Range + +# Register Range in _ACD: +_ACD.Range_swigregister(Range) + +def Range_all(): + return _ACD.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _ACD.delete_SwigPyIterator + + def value(self): + return _ACD.SwigPyIterator_value(self) + + def incr(self, n=1): + return _ACD.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _ACD.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _ACD.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _ACD.SwigPyIterator_equal(self, x) + + def copy(self): + return _ACD.SwigPyIterator_copy(self) + + def next(self): + return _ACD.SwigPyIterator_next(self) + + def __next__(self): + return _ACD.SwigPyIterator___next__(self) + + def previous(self): + return _ACD.SwigPyIterator_previous(self) + + def advance(self, n): + return _ACD.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _ACD.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _ACD.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _ACD.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _ACD.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _ACD.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _ACD.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _ACD: +_ACD.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_AddOp_swiginit(self, _ACD.new_Matx_AddOp()) + __swig_destroy__ = _ACD.delete_Matx_AddOp + +# Register Matx_AddOp in _ACD: +_ACD.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_SubOp_swiginit(self, _ACD.new_Matx_SubOp()) + __swig_destroy__ = _ACD.delete_Matx_SubOp + +# Register Matx_SubOp in _ACD: +_ACD.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_ScaleOp_swiginit(self, _ACD.new_Matx_ScaleOp()) + __swig_destroy__ = _ACD.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _ACD: +_ACD.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_MulOp_swiginit(self, _ACD.new_Matx_MulOp()) + __swig_destroy__ = _ACD.delete_Matx_MulOp + +# Register Matx_MulOp in _ACD: +_ACD.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_DivOp_swiginit(self, _ACD.new_Matx_DivOp()) + __swig_destroy__ = _ACD.delete_Matx_DivOp + +# Register Matx_DivOp in _ACD: +_ACD.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_MatMulOp_swiginit(self, _ACD.new_Matx_MatMulOp()) + __swig_destroy__ = _ACD.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _ACD: +_ACD.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_TOp_swiginit(self, _ACD.new_Matx_TOp()) + __swig_destroy__ = _ACD.delete_Matx_TOp + +# Register Matx_TOp in _ACD: +_ACD.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _ACD.delete_Mat + + def row(self, y): + return _ACD.Mat_row(self, y) + + def col(self, x): + return _ACD.Mat_col(self, x) + + def rowRange(self, *args): + return _ACD.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _ACD.Mat_colRange(self, *args) + + def diag(self, d=0): + return _ACD.Mat_diag(self, d) + + def clone(self): + return _ACD.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _ACD.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _ACD.Mat_reshape(self, *args) + + def create(self, *args): + return _ACD.Mat_create(self, *args) + + def addref(self): + return _ACD.Mat_addref(self) + + def release(self): + return _ACD.Mat_release(self) + + def deallocate(self): + return _ACD.Mat_deallocate(self) + + def copySize(self, m): + return _ACD.Mat_copySize(self, m) + + def reserve(self, sz): + return _ACD.Mat_reserve(self, sz) + + def resize(self, *args): + return _ACD.Mat_resize(self, *args) + + def push_back_(self, elem): + return _ACD.Mat_push_back_(self, elem) + + def push_back(self, m): + return _ACD.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _ACD.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _ACD.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD.Mat___call__(self, *args) + + def isContinuous(self): + return _ACD.Mat_isContinuous(self) + + def isSubmatrix(self): + return _ACD.Mat_isSubmatrix(self) + + def elemSize(self): + return _ACD.Mat_elemSize(self) + + def elemSize1(self): + return _ACD.Mat_elemSize1(self) + + def type(self): + return _ACD.Mat_type(self) + + def depth(self): + return _ACD.Mat_depth(self) + + def channels(self): + return _ACD.Mat_channels(self) + + def step1(self, i=0): + return _ACD.Mat_step1(self, i) + + def empty(self): + return _ACD.Mat_empty(self) + + def total(self): + return _ACD.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _ACD.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _ACD.Mat_ptr(self, *args) + MAGIC_VAL = _ACD.Mat_MAGIC_VAL + AUTO_STEP = _ACD.Mat_AUTO_STEP + CONTINUOUS_FLAG = _ACD.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _ACD.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _ACD.Mat_MAGIC_MASK + TYPE_MASK = _ACD.Mat_TYPE_MASK + DEPTH_MASK = _ACD.Mat_DEPTH_MASK + flags = property(_ACD.Mat_flags_get, _ACD.Mat_flags_set) + dims = property(_ACD.Mat_dims_get, _ACD.Mat_dims_set) + rows = property(_ACD.Mat_rows_get, _ACD.Mat_rows_set) + cols = property(_ACD.Mat_cols_get, _ACD.Mat_cols_set) + data = property(_ACD.Mat_data_get, _ACD.Mat_data_set) + datastart = property(_ACD.Mat_datastart_get, _ACD.Mat_datastart_set) + dataend = property(_ACD.Mat_dataend_get, _ACD.Mat_dataend_set) + datalimit = property(_ACD.Mat_datalimit_get, _ACD.Mat_datalimit_set) + + def __init__(self, *args): + _ACD.Mat_swiginit(self, _ACD.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD.Mat___str__(self) + +# Register Mat in _ACD: +_ACD.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _ACD._cv_numpy_sizeof_uint8_t_swiginit(self, _ACD.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _ACD: +_ACD._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _ACD.uint8_tArray___bool__(self) + + def __len__(self): + return _ACD.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _ACD.uint8_tArray_pop(self) + + def append(self, x): + return _ACD.uint8_tArray_append(self, x) + + def empty(self): + return _ACD.uint8_tArray_empty(self) + + def size(self): + return _ACD.uint8_tArray_size(self) + + def swap(self, v): + return _ACD.uint8_tArray_swap(self, v) + + def begin(self): + return _ACD.uint8_tArray_begin(self) + + def end(self): + return _ACD.uint8_tArray_end(self) + + def rbegin(self): + return _ACD.uint8_tArray_rbegin(self) + + def rend(self): + return _ACD.uint8_tArray_rend(self) + + def clear(self): + return _ACD.uint8_tArray_clear(self) + + def get_allocator(self): + return _ACD.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _ACD.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _ACD.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _ACD.uint8_tArray_swiginit(self, _ACD.new_uint8_tArray(*args)) + + def push_back(self, x): + return _ACD.uint8_tArray_push_back(self, x) + + def front(self): + return _ACD.uint8_tArray_front(self) + + def back(self): + return _ACD.uint8_tArray_back(self) + + def assign(self, n, x): + return _ACD.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _ACD.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _ACD.uint8_tArray_reserve(self, n) + + def capacity(self): + return _ACD.uint8_tArray_capacity(self) + __swig_destroy__ = _ACD.delete_uint8_tArray + +# Register uint8_tArray in _ACD: +_ACD.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_uint8_t_2_1_rows + cols = _ACD._Matx_uint8_t_2_1_cols + channels = _ACD._Matx_uint8_t_2_1_channels + shortdim = _ACD._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_ACD._Matx_uint8_t_2_1_val_get, _ACD._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_uint8_t_2_1_swiginit(self, _ACD.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _ACD: +_ACD._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _ACD._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _ACD._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _ACD._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _ACD._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _ACD._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _ACD._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_uint8_t_2_swiginit(self, _ACD.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _ACD: +_ACD._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _ACD._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_uint8_t_2_generic_type + channels = _ACD._DataType_Vec_uint8_t_2_channels + fmt = _ACD._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _ACD._DataType_Vec_uint8_t_2_swiginit(self, _ACD.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _ACD: +_ACD._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_uint8_t_3_1_rows + cols = _ACD._Matx_uint8_t_3_1_cols + channels = _ACD._Matx_uint8_t_3_1_channels + shortdim = _ACD._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_ACD._Matx_uint8_t_3_1_val_get, _ACD._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_uint8_t_3_1_swiginit(self, _ACD.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _ACD: +_ACD._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _ACD._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _ACD._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _ACD._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _ACD._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _ACD._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _ACD._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_uint8_t_3_swiginit(self, _ACD.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _ACD: +_ACD._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _ACD._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_uint8_t_3_generic_type + channels = _ACD._DataType_Vec_uint8_t_3_channels + fmt = _ACD._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _ACD._DataType_Vec_uint8_t_3_swiginit(self, _ACD.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _ACD: +_ACD._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_uint8_t_4_1_rows + cols = _ACD._Matx_uint8_t_4_1_cols + channels = _ACD._Matx_uint8_t_4_1_channels + shortdim = _ACD._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_ACD._Matx_uint8_t_4_1_val_get, _ACD._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_uint8_t_4_1_swiginit(self, _ACD.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _ACD: +_ACD._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _ACD._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _ACD._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _ACD._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _ACD._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _ACD._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _ACD._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_uint8_t_4_swiginit(self, _ACD.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _ACD: +_ACD._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _ACD._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_uint8_t_4_generic_type + channels = _ACD._DataType_Vec_uint8_t_4_channels + fmt = _ACD._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _ACD._DataType_Vec_uint8_t_4_swiginit(self, _ACD.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _ACD: +_ACD._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_short_value + + def __init__(self): + _ACD._cv_numpy_sizeof_short_swiginit(self, _ACD.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _ACD: +_ACD._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.shortArray___nonzero__(self) + + def __bool__(self): + return _ACD.shortArray___bool__(self) + + def __len__(self): + return _ACD.shortArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.shortArray___setitem__(self, *args) + + def pop(self): + return _ACD.shortArray_pop(self) + + def append(self, x): + return _ACD.shortArray_append(self, x) + + def empty(self): + return _ACD.shortArray_empty(self) + + def size(self): + return _ACD.shortArray_size(self) + + def swap(self, v): + return _ACD.shortArray_swap(self, v) + + def begin(self): + return _ACD.shortArray_begin(self) + + def end(self): + return _ACD.shortArray_end(self) + + def rbegin(self): + return _ACD.shortArray_rbegin(self) + + def rend(self): + return _ACD.shortArray_rend(self) + + def clear(self): + return _ACD.shortArray_clear(self) + + def get_allocator(self): + return _ACD.shortArray_get_allocator(self) + + def pop_back(self): + return _ACD.shortArray_pop_back(self) + + def erase(self, *args): + return _ACD.shortArray_erase(self, *args) + + def __init__(self, *args): + _ACD.shortArray_swiginit(self, _ACD.new_shortArray(*args)) + + def push_back(self, x): + return _ACD.shortArray_push_back(self, x) + + def front(self): + return _ACD.shortArray_front(self) + + def back(self): + return _ACD.shortArray_back(self) + + def assign(self, n, x): + return _ACD.shortArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.shortArray_resize(self, *args) + + def insert(self, *args): + return _ACD.shortArray_insert(self, *args) + + def reserve(self, n): + return _ACD.shortArray_reserve(self, n) + + def capacity(self): + return _ACD.shortArray_capacity(self) + __swig_destroy__ = _ACD.delete_shortArray + +# Register shortArray in _ACD: +_ACD.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_short_2_1_rows + cols = _ACD._Matx_short_2_1_cols + channels = _ACD._Matx_short_2_1_channels + shortdim = _ACD._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_short_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_short_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_short_2_1___call__(self, i, j) + val = property(_ACD._Matx_short_2_1_val_get, _ACD._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_short_2_1_swiginit(self, _ACD.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_short_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _ACD: +_ACD._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _ACD._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _ACD._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _ACD._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _ACD._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _ACD._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _ACD._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_short_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_short_2_swiginit(self, _ACD.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_short_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_short_2 + +# Register _Vec_short_2 in _ACD: +_ACD._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _ACD._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_short_2_generic_type + channels = _ACD._DataType_Vec_short_2_channels + fmt = _ACD._DataType_Vec_short_2_fmt + + def __init__(self): + _ACD._DataType_Vec_short_2_swiginit(self, _ACD.new__DataType_Vec_short_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _ACD: +_ACD._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_short_3_1_rows + cols = _ACD._Matx_short_3_1_cols + channels = _ACD._Matx_short_3_1_channels + shortdim = _ACD._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_short_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_short_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_short_3_1___call__(self, i, j) + val = property(_ACD._Matx_short_3_1_val_get, _ACD._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_short_3_1_swiginit(self, _ACD.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_short_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _ACD: +_ACD._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _ACD._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _ACD._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _ACD._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _ACD._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _ACD._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _ACD._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_short_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_short_3_swiginit(self, _ACD.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_short_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_short_3 + +# Register _Vec_short_3 in _ACD: +_ACD._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _ACD._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_short_3_generic_type + channels = _ACD._DataType_Vec_short_3_channels + fmt = _ACD._DataType_Vec_short_3_fmt + + def __init__(self): + _ACD._DataType_Vec_short_3_swiginit(self, _ACD.new__DataType_Vec_short_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _ACD: +_ACD._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_short_4_1_rows + cols = _ACD._Matx_short_4_1_cols + channels = _ACD._Matx_short_4_1_channels + shortdim = _ACD._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_short_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_short_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_short_4_1___call__(self, i, j) + val = property(_ACD._Matx_short_4_1_val_get, _ACD._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_short_4_1_swiginit(self, _ACD.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_short_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _ACD: +_ACD._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _ACD._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _ACD._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _ACD._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _ACD._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _ACD._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _ACD._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_short_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_short_4_swiginit(self, _ACD.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_short_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_short_4 + +# Register _Vec_short_4 in _ACD: +_ACD._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _ACD._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_short_4_generic_type + channels = _ACD._DataType_Vec_short_4_channels + fmt = _ACD._DataType_Vec_short_4_fmt + + def __init__(self): + _ACD._DataType_Vec_short_4_swiginit(self, _ACD.new__DataType_Vec_short_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _ACD: +_ACD._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_ushort_value + + def __init__(self): + _ACD._cv_numpy_sizeof_ushort_swiginit(self, _ACD.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _ACD: +_ACD._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.ushortArray___nonzero__(self) + + def __bool__(self): + return _ACD.ushortArray___bool__(self) + + def __len__(self): + return _ACD.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.ushortArray___setitem__(self, *args) + + def pop(self): + return _ACD.ushortArray_pop(self) + + def append(self, x): + return _ACD.ushortArray_append(self, x) + + def empty(self): + return _ACD.ushortArray_empty(self) + + def size(self): + return _ACD.ushortArray_size(self) + + def swap(self, v): + return _ACD.ushortArray_swap(self, v) + + def begin(self): + return _ACD.ushortArray_begin(self) + + def end(self): + return _ACD.ushortArray_end(self) + + def rbegin(self): + return _ACD.ushortArray_rbegin(self) + + def rend(self): + return _ACD.ushortArray_rend(self) + + def clear(self): + return _ACD.ushortArray_clear(self) + + def get_allocator(self): + return _ACD.ushortArray_get_allocator(self) + + def pop_back(self): + return _ACD.ushortArray_pop_back(self) + + def erase(self, *args): + return _ACD.ushortArray_erase(self, *args) + + def __init__(self, *args): + _ACD.ushortArray_swiginit(self, _ACD.new_ushortArray(*args)) + + def push_back(self, x): + return _ACD.ushortArray_push_back(self, x) + + def front(self): + return _ACD.ushortArray_front(self) + + def back(self): + return _ACD.ushortArray_back(self) + + def assign(self, n, x): + return _ACD.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.ushortArray_resize(self, *args) + + def insert(self, *args): + return _ACD.ushortArray_insert(self, *args) + + def reserve(self, n): + return _ACD.ushortArray_reserve(self, n) + + def capacity(self): + return _ACD.ushortArray_capacity(self) + __swig_destroy__ = _ACD.delete_ushortArray + +# Register ushortArray in _ACD: +_ACD.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_ushort_2_1_rows + cols = _ACD._Matx_ushort_2_1_cols + channels = _ACD._Matx_ushort_2_1_channels + shortdim = _ACD._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_ushort_2_1___call__(self, i, j) + val = property(_ACD._Matx_ushort_2_1_val_get, _ACD._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_ushort_2_1_swiginit(self, _ACD.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _ACD: +_ACD._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _ACD._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _ACD._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _ACD._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _ACD._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _ACD._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _ACD._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_ushort_2_swiginit(self, _ACD.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_ushort_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _ACD: +_ACD._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _ACD._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_ushort_2_generic_type + channels = _ACD._DataType_Vec_ushort_2_channels + fmt = _ACD._DataType_Vec_ushort_2_fmt + + def __init__(self): + _ACD._DataType_Vec_ushort_2_swiginit(self, _ACD.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _ACD: +_ACD._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_ushort_3_1_rows + cols = _ACD._Matx_ushort_3_1_cols + channels = _ACD._Matx_ushort_3_1_channels + shortdim = _ACD._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_ushort_3_1___call__(self, i, j) + val = property(_ACD._Matx_ushort_3_1_val_get, _ACD._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_ushort_3_1_swiginit(self, _ACD.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _ACD: +_ACD._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _ACD._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _ACD._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _ACD._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _ACD._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _ACD._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _ACD._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_ushort_3_swiginit(self, _ACD.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_ushort_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _ACD: +_ACD._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _ACD._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_ushort_3_generic_type + channels = _ACD._DataType_Vec_ushort_3_channels + fmt = _ACD._DataType_Vec_ushort_3_fmt + + def __init__(self): + _ACD._DataType_Vec_ushort_3_swiginit(self, _ACD.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _ACD: +_ACD._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_ushort_4_1_rows + cols = _ACD._Matx_ushort_4_1_cols + channels = _ACD._Matx_ushort_4_1_channels + shortdim = _ACD._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_ushort_4_1___call__(self, i, j) + val = property(_ACD._Matx_ushort_4_1_val_get, _ACD._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_ushort_4_1_swiginit(self, _ACD.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _ACD: +_ACD._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _ACD._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _ACD._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _ACD._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _ACD._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _ACD._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _ACD._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_ushort_4_swiginit(self, _ACD.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_ushort_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _ACD: +_ACD._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _ACD._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_ushort_4_generic_type + channels = _ACD._DataType_Vec_ushort_4_channels + fmt = _ACD._DataType_Vec_ushort_4_fmt + + def __init__(self): + _ACD._DataType_Vec_ushort_4_swiginit(self, _ACD.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _ACD: +_ACD._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_int_value + + def __init__(self): + _ACD._cv_numpy_sizeof_int_swiginit(self, _ACD.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _ACD: +_ACD._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.intArray___nonzero__(self) + + def __bool__(self): + return _ACD.intArray___bool__(self) + + def __len__(self): + return _ACD.intArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.intArray___setitem__(self, *args) + + def pop(self): + return _ACD.intArray_pop(self) + + def append(self, x): + return _ACD.intArray_append(self, x) + + def empty(self): + return _ACD.intArray_empty(self) + + def size(self): + return _ACD.intArray_size(self) + + def swap(self, v): + return _ACD.intArray_swap(self, v) + + def begin(self): + return _ACD.intArray_begin(self) + + def end(self): + return _ACD.intArray_end(self) + + def rbegin(self): + return _ACD.intArray_rbegin(self) + + def rend(self): + return _ACD.intArray_rend(self) + + def clear(self): + return _ACD.intArray_clear(self) + + def get_allocator(self): + return _ACD.intArray_get_allocator(self) + + def pop_back(self): + return _ACD.intArray_pop_back(self) + + def erase(self, *args): + return _ACD.intArray_erase(self, *args) + + def __init__(self, *args): + _ACD.intArray_swiginit(self, _ACD.new_intArray(*args)) + + def push_back(self, x): + return _ACD.intArray_push_back(self, x) + + def front(self): + return _ACD.intArray_front(self) + + def back(self): + return _ACD.intArray_back(self) + + def assign(self, n, x): + return _ACD.intArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.intArray_resize(self, *args) + + def insert(self, *args): + return _ACD.intArray_insert(self, *args) + + def reserve(self, n): + return _ACD.intArray_reserve(self, n) + + def capacity(self): + return _ACD.intArray_capacity(self) + __swig_destroy__ = _ACD.delete_intArray + +# Register intArray in _ACD: +_ACD.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_2_1_rows + cols = _ACD._Matx_int_2_1_cols + channels = _ACD._Matx_int_2_1_channels + shortdim = _ACD._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_2_1___call__(self, i, j) + val = property(_ACD._Matx_int_2_1_val_get, _ACD._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_2_1_swiginit(self, _ACD.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _ACD: +_ACD._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _ACD._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _ACD._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _ACD._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _ACD._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _ACD._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _ACD._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_2_swiginit(self, _ACD.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_2 + +# Register _Vec_int_2 in _ACD: +_ACD._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _ACD._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_2_generic_type + channels = _ACD._DataType_Vec_int_2_channels + fmt = _ACD._DataType_Vec_int_2_fmt + + def __init__(self): + _ACD._DataType_Vec_int_2_swiginit(self, _ACD.new__DataType_Vec_int_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _ACD: +_ACD._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_3_1_rows + cols = _ACD._Matx_int_3_1_cols + channels = _ACD._Matx_int_3_1_channels + shortdim = _ACD._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_3_1___call__(self, i, j) + val = property(_ACD._Matx_int_3_1_val_get, _ACD._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_3_1_swiginit(self, _ACD.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _ACD: +_ACD._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _ACD._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _ACD._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _ACD._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _ACD._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _ACD._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _ACD._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_3_swiginit(self, _ACD.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_3 + +# Register _Vec_int_3 in _ACD: +_ACD._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _ACD._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_3_generic_type + channels = _ACD._DataType_Vec_int_3_channels + fmt = _ACD._DataType_Vec_int_3_fmt + + def __init__(self): + _ACD._DataType_Vec_int_3_swiginit(self, _ACD.new__DataType_Vec_int_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _ACD: +_ACD._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_4_1_rows + cols = _ACD._Matx_int_4_1_cols + channels = _ACD._Matx_int_4_1_channels + shortdim = _ACD._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_4_1___call__(self, i, j) + val = property(_ACD._Matx_int_4_1_val_get, _ACD._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_4_1_swiginit(self, _ACD.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _ACD: +_ACD._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _ACD._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _ACD._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _ACD._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _ACD._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _ACD._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _ACD._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_4_swiginit(self, _ACD.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_4 + +# Register _Vec_int_4 in _ACD: +_ACD._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _ACD._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_4_generic_type + channels = _ACD._DataType_Vec_int_4_channels + fmt = _ACD._DataType_Vec_int_4_fmt + + def __init__(self): + _ACD._DataType_Vec_int_4_swiginit(self, _ACD.new__DataType_Vec_int_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _ACD: +_ACD._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_6_1_rows + cols = _ACD._Matx_int_6_1_cols + channels = _ACD._Matx_int_6_1_channels + shortdim = _ACD._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_6_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_6_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_6_1___call__(self, i, j) + val = property(_ACD._Matx_int_6_1_val_get, _ACD._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_6_1_swiginit(self, _ACD.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_6_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _ACD: +_ACD._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _ACD._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _ACD._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _ACD._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _ACD._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _ACD._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _ACD._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_6_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_6_swiginit(self, _ACD.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_6___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_6 + +# Register _Vec_int_6 in _ACD: +_ACD._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _ACD._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_6_generic_type + channels = _ACD._DataType_Vec_int_6_channels + fmt = _ACD._DataType_Vec_int_6_fmt + + def __init__(self): + _ACD._DataType_Vec_int_6_swiginit(self, _ACD.new__DataType_Vec_int_6()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _ACD: +_ACD._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_8_1_rows + cols = _ACD._Matx_int_8_1_cols + channels = _ACD._Matx_int_8_1_channels + shortdim = _ACD._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_8_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_8_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_8_1___call__(self, i, j) + val = property(_ACD._Matx_int_8_1_val_get, _ACD._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_8_1_swiginit(self, _ACD.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_8_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _ACD: +_ACD._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _ACD._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _ACD._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _ACD._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _ACD._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _ACD._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _ACD._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_8_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_8_swiginit(self, _ACD.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_8___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_8 + +# Register _Vec_int_8 in _ACD: +_ACD._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _ACD._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_8_generic_type + channels = _ACD._DataType_Vec_int_8_channels + fmt = _ACD._DataType_Vec_int_8_fmt + + def __init__(self): + _ACD._DataType_Vec_int_8_swiginit(self, _ACD.new__DataType_Vec_int_8()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _ACD: +_ACD._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_float_value + + def __init__(self): + _ACD._cv_numpy_sizeof_float_swiginit(self, _ACD.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _ACD: +_ACD._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.floatArray___nonzero__(self) + + def __bool__(self): + return _ACD.floatArray___bool__(self) + + def __len__(self): + return _ACD.floatArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.floatArray___setitem__(self, *args) + + def pop(self): + return _ACD.floatArray_pop(self) + + def append(self, x): + return _ACD.floatArray_append(self, x) + + def empty(self): + return _ACD.floatArray_empty(self) + + def size(self): + return _ACD.floatArray_size(self) + + def swap(self, v): + return _ACD.floatArray_swap(self, v) + + def begin(self): + return _ACD.floatArray_begin(self) + + def end(self): + return _ACD.floatArray_end(self) + + def rbegin(self): + return _ACD.floatArray_rbegin(self) + + def rend(self): + return _ACD.floatArray_rend(self) + + def clear(self): + return _ACD.floatArray_clear(self) + + def get_allocator(self): + return _ACD.floatArray_get_allocator(self) + + def pop_back(self): + return _ACD.floatArray_pop_back(self) + + def erase(self, *args): + return _ACD.floatArray_erase(self, *args) + + def __init__(self, *args): + _ACD.floatArray_swiginit(self, _ACD.new_floatArray(*args)) + + def push_back(self, x): + return _ACD.floatArray_push_back(self, x) + + def front(self): + return _ACD.floatArray_front(self) + + def back(self): + return _ACD.floatArray_back(self) + + def assign(self, n, x): + return _ACD.floatArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.floatArray_resize(self, *args) + + def insert(self, *args): + return _ACD.floatArray_insert(self, *args) + + def reserve(self, n): + return _ACD.floatArray_reserve(self, n) + + def capacity(self): + return _ACD.floatArray_capacity(self) + __swig_destroy__ = _ACD.delete_floatArray + +# Register floatArray in _ACD: +_ACD.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_2_1_rows + cols = _ACD._Matx_float_2_1_cols + channels = _ACD._Matx_float_2_1_channels + shortdim = _ACD._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_float_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_2_1___call__(self, i, j) + val = property(_ACD._Matx_float_2_1_val_get, _ACD._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_2_1_swiginit(self, _ACD.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _ACD: +_ACD._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _ACD._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _ACD._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _ACD._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _ACD._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _ACD._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _ACD._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_float_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_float_2_swiginit(self, _ACD.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_float_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_float_2 + +# Register _Vec_float_2 in _ACD: +_ACD._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _ACD._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_float_2_generic_type + channels = _ACD._DataType_Vec_float_2_channels + fmt = _ACD._DataType_Vec_float_2_fmt + + def __init__(self): + _ACD._DataType_Vec_float_2_swiginit(self, _ACD.new__DataType_Vec_float_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _ACD: +_ACD._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_3_1_rows + cols = _ACD._Matx_float_3_1_cols + channels = _ACD._Matx_float_3_1_channels + shortdim = _ACD._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_float_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_3_1___call__(self, i, j) + val = property(_ACD._Matx_float_3_1_val_get, _ACD._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_3_1_swiginit(self, _ACD.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _ACD: +_ACD._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _ACD._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _ACD._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _ACD._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _ACD._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _ACD._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _ACD._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_float_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_float_3_swiginit(self, _ACD.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_float_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_float_3 + +# Register _Vec_float_3 in _ACD: +_ACD._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _ACD._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_float_3_generic_type + channels = _ACD._DataType_Vec_float_3_channels + fmt = _ACD._DataType_Vec_float_3_fmt + + def __init__(self): + _ACD._DataType_Vec_float_3_swiginit(self, _ACD.new__DataType_Vec_float_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _ACD: +_ACD._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_4_1_rows + cols = _ACD._Matx_float_4_1_cols + channels = _ACD._Matx_float_4_1_channels + shortdim = _ACD._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_float_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_4_1___call__(self, i, j) + val = property(_ACD._Matx_float_4_1_val_get, _ACD._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_4_1_swiginit(self, _ACD.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _ACD: +_ACD._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _ACD._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _ACD._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _ACD._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _ACD._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _ACD._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _ACD._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_float_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_float_4_swiginit(self, _ACD.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_float_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_float_4 + +# Register _Vec_float_4 in _ACD: +_ACD._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _ACD._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_float_4_generic_type + channels = _ACD._DataType_Vec_float_4_channels + fmt = _ACD._DataType_Vec_float_4_fmt + + def __init__(self): + _ACD._DataType_Vec_float_4_swiginit(self, _ACD.new__DataType_Vec_float_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _ACD: +_ACD._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_6_1_rows + cols = _ACD._Matx_float_6_1_cols + channels = _ACD._Matx_float_6_1_channels + shortdim = _ACD._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_6_1_ddot(self, v) + + def t(self): + return _ACD._Matx_float_6_1_t(self) + + def mul(self, a): + return _ACD._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_6_1___call__(self, i, j) + val = property(_ACD._Matx_float_6_1_val_get, _ACD._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_6_1_swiginit(self, _ACD.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_6_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _ACD: +_ACD._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _ACD._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _ACD._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _ACD._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _ACD._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _ACD._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _ACD._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_float_6_all(alpha) + + def mul(self, v): + return _ACD._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_float_6_swiginit(self, _ACD.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_float_6___str__(self) + __swig_destroy__ = _ACD.delete__Vec_float_6 + +# Register _Vec_float_6 in _ACD: +_ACD._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _ACD._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_float_6_generic_type + channels = _ACD._DataType_Vec_float_6_channels + fmt = _ACD._DataType_Vec_float_6_fmt + + def __init__(self): + _ACD._DataType_Vec_float_6_swiginit(self, _ACD.new__DataType_Vec_float_6()) + __swig_destroy__ = _ACD.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _ACD: +_ACD._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_double_value + + def __init__(self): + _ACD._cv_numpy_sizeof_double_swiginit(self, _ACD.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _ACD: +_ACD._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.doubleArray___nonzero__(self) + + def __bool__(self): + return _ACD.doubleArray___bool__(self) + + def __len__(self): + return _ACD.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.doubleArray___setitem__(self, *args) + + def pop(self): + return _ACD.doubleArray_pop(self) + + def append(self, x): + return _ACD.doubleArray_append(self, x) + + def empty(self): + return _ACD.doubleArray_empty(self) + + def size(self): + return _ACD.doubleArray_size(self) + + def swap(self, v): + return _ACD.doubleArray_swap(self, v) + + def begin(self): + return _ACD.doubleArray_begin(self) + + def end(self): + return _ACD.doubleArray_end(self) + + def rbegin(self): + return _ACD.doubleArray_rbegin(self) + + def rend(self): + return _ACD.doubleArray_rend(self) + + def clear(self): + return _ACD.doubleArray_clear(self) + + def get_allocator(self): + return _ACD.doubleArray_get_allocator(self) + + def pop_back(self): + return _ACD.doubleArray_pop_back(self) + + def erase(self, *args): + return _ACD.doubleArray_erase(self, *args) + + def __init__(self, *args): + _ACD.doubleArray_swiginit(self, _ACD.new_doubleArray(*args)) + + def push_back(self, x): + return _ACD.doubleArray_push_back(self, x) + + def front(self): + return _ACD.doubleArray_front(self) + + def back(self): + return _ACD.doubleArray_back(self) + + def assign(self, n, x): + return _ACD.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.doubleArray_resize(self, *args) + + def insert(self, *args): + return _ACD.doubleArray_insert(self, *args) + + def reserve(self, n): + return _ACD.doubleArray_reserve(self, n) + + def capacity(self): + return _ACD.doubleArray_capacity(self) + __swig_destroy__ = _ACD.delete_doubleArray + +# Register doubleArray in _ACD: +_ACD.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_2_1_rows + cols = _ACD._Matx_double_2_1_cols + channels = _ACD._Matx_double_2_1_channels + shortdim = _ACD._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_double_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_2_1___call__(self, i, j) + val = property(_ACD._Matx_double_2_1_val_get, _ACD._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_2_1_swiginit(self, _ACD.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _ACD: +_ACD._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _ACD._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _ACD._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _ACD._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _ACD._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _ACD._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _ACD._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_double_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_double_2_swiginit(self, _ACD.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_double_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_double_2 + +# Register _Vec_double_2 in _ACD: +_ACD._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _ACD._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_double_2_generic_type + channels = _ACD._DataType_Vec_double_2_channels + fmt = _ACD._DataType_Vec_double_2_fmt + + def __init__(self): + _ACD._DataType_Vec_double_2_swiginit(self, _ACD.new__DataType_Vec_double_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _ACD: +_ACD._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_3_1_rows + cols = _ACD._Matx_double_3_1_cols + channels = _ACD._Matx_double_3_1_channels + shortdim = _ACD._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_double_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_3_1___call__(self, i, j) + val = property(_ACD._Matx_double_3_1_val_get, _ACD._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_3_1_swiginit(self, _ACD.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _ACD: +_ACD._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _ACD._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _ACD._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _ACD._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _ACD._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _ACD._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _ACD._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_double_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_double_3_swiginit(self, _ACD.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_double_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_double_3 + +# Register _Vec_double_3 in _ACD: +_ACD._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _ACD._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_double_3_generic_type + channels = _ACD._DataType_Vec_double_3_channels + fmt = _ACD._DataType_Vec_double_3_fmt + + def __init__(self): + _ACD._DataType_Vec_double_3_swiginit(self, _ACD.new__DataType_Vec_double_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _ACD: +_ACD._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_4_1_rows + cols = _ACD._Matx_double_4_1_cols + channels = _ACD._Matx_double_4_1_channels + shortdim = _ACD._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_double_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_4_1___call__(self, i, j) + val = property(_ACD._Matx_double_4_1_val_get, _ACD._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_4_1_swiginit(self, _ACD.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _ACD: +_ACD._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _ACD._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _ACD._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _ACD._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _ACD._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _ACD._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _ACD._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_double_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_double_4_swiginit(self, _ACD.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_double_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_double_4 + +# Register _Vec_double_4 in _ACD: +_ACD._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _ACD._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_double_4_generic_type + channels = _ACD._DataType_Vec_double_4_channels + fmt = _ACD._DataType_Vec_double_4_fmt + + def __init__(self): + _ACD._DataType_Vec_double_4_swiginit(self, _ACD.new__DataType_Vec_double_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _ACD: +_ACD._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_6_1_rows + cols = _ACD._Matx_double_6_1_cols + channels = _ACD._Matx_double_6_1_channels + shortdim = _ACD._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_6_1_ddot(self, v) + + def t(self): + return _ACD._Matx_double_6_1_t(self) + + def mul(self, a): + return _ACD._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_6_1___call__(self, i, j) + val = property(_ACD._Matx_double_6_1_val_get, _ACD._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_6_1_swiginit(self, _ACD.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_6_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _ACD: +_ACD._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _ACD._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _ACD._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _ACD._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _ACD._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _ACD._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _ACD._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_double_6_all(alpha) + + def mul(self, v): + return _ACD._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_double_6_swiginit(self, _ACD.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_double_6___str__(self) + __swig_destroy__ = _ACD.delete__Vec_double_6 + +# Register _Vec_double_6 in _ACD: +_ACD._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _ACD._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_double_6_generic_type + channels = _ACD._DataType_Vec_double_6_channels + fmt = _ACD._DataType_Vec_double_6_fmt + + def __init__(self): + _ACD._DataType_Vec_double_6_swiginit(self, _ACD.new__DataType_Vec_double_6()) + __swig_destroy__ = _ACD.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _ACD: +_ACD._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD._mat__np_array_constructor_swiginit(self, _ACD.new__mat__np_array_constructor()) + __swig_destroy__ = _ACD.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _ACD: +_ACD._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _ACD._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _ACD._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_uchar_value + + def __init__(self): + _ACD._cv_numpy_sizeof_uchar_swiginit(self, _ACD.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _ACD: +_ACD._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__uchar_create(self, *args) + + def cross(self, m): + return _ACD._Mat__uchar_cross(self, m) + + def row(self, y): + return _ACD._Mat__uchar_row(self, y) + + def col(self, x): + return _ACD._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__uchar_diag(self, d) + + def clone(self): + return _ACD._Mat__uchar_clone(self) + + def elemSize(self): + return _ACD._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__uchar_elemSize1(self) + + def type(self): + return _ACD._Mat__uchar_type(self) + + def depth(self): + return _ACD._Mat__uchar_depth(self) + + def channels(self): + return _ACD._Mat__uchar_channels(self) + + def step1(self, i=0): + return _ACD._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__uchar_swiginit(self, _ACD.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__uchar___str__(self) + __swig_destroy__ = _ACD.delete__Mat__uchar + +# Register _Mat__uchar in _ACD: +_ACD._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2b_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _ACD: +_ACD._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2b_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2b_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2b_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2b_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2b_type(self) + + def depth(self): + return _ACD._Mat__Vec2b_depth(self) + + def channels(self): + return _ACD._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2b_swiginit(self, _ACD.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2b___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _ACD: +_ACD._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3b_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _ACD: +_ACD._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3b_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3b_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3b_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3b_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3b_type(self) + + def depth(self): + return _ACD._Mat__Vec3b_depth(self) + + def channels(self): + return _ACD._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3b_swiginit(self, _ACD.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3b___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _ACD: +_ACD._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4b_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _ACD: +_ACD._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4b_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4b_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4b_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4b_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4b_type(self) + + def depth(self): + return _ACD._Mat__Vec4b_depth(self) + + def channels(self): + return _ACD._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4b_swiginit(self, _ACD.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4b___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _ACD: +_ACD._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__short_create(self, *args) + + def cross(self, m): + return _ACD._Mat__short_cross(self, m) + + def row(self, y): + return _ACD._Mat__short_row(self, y) + + def col(self, x): + return _ACD._Mat__short_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__short_diag(self, d) + + def clone(self): + return _ACD._Mat__short_clone(self) + + def elemSize(self): + return _ACD._Mat__short_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__short_elemSize1(self) + + def type(self): + return _ACD._Mat__short_type(self) + + def depth(self): + return _ACD._Mat__short_depth(self) + + def channels(self): + return _ACD._Mat__short_channels(self) + + def step1(self, i=0): + return _ACD._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__short___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__short_swiginit(self, _ACD.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__short___str__(self) + __swig_destroy__ = _ACD.delete__Mat__short + +# Register _Mat__short in _ACD: +_ACD._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2s_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _ACD: +_ACD._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2s_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2s_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2s_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2s_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2s_type(self) + + def depth(self): + return _ACD._Mat__Vec2s_depth(self) + + def channels(self): + return _ACD._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2s_swiginit(self, _ACD.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2s___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _ACD: +_ACD._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3s_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _ACD: +_ACD._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3s_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3s_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3s_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3s_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3s_type(self) + + def depth(self): + return _ACD._Mat__Vec3s_depth(self) + + def channels(self): + return _ACD._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3s_swiginit(self, _ACD.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3s___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _ACD: +_ACD._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4s_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _ACD: +_ACD._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4s_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4s_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4s_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4s_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4s_type(self) + + def depth(self): + return _ACD._Mat__Vec4s_depth(self) + + def channels(self): + return _ACD._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4s_swiginit(self, _ACD.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4s___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _ACD: +_ACD._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__ushort_create(self, *args) + + def cross(self, m): + return _ACD._Mat__ushort_cross(self, m) + + def row(self, y): + return _ACD._Mat__ushort_row(self, y) + + def col(self, x): + return _ACD._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__ushort_diag(self, d) + + def clone(self): + return _ACD._Mat__ushort_clone(self) + + def elemSize(self): + return _ACD._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__ushort_elemSize1(self) + + def type(self): + return _ACD._Mat__ushort_type(self) + + def depth(self): + return _ACD._Mat__ushort_depth(self) + + def channels(self): + return _ACD._Mat__ushort_channels(self) + + def step1(self, i=0): + return _ACD._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__ushort_swiginit(self, _ACD.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__ushort___str__(self) + __swig_destroy__ = _ACD.delete__Mat__ushort + +# Register _Mat__ushort in _ACD: +_ACD._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2w_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _ACD: +_ACD._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2w_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2w_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2w_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2w_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2w_type(self) + + def depth(self): + return _ACD._Mat__Vec2w_depth(self) + + def channels(self): + return _ACD._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2w_swiginit(self, _ACD.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2w___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _ACD: +_ACD._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3w_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _ACD: +_ACD._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3w_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3w_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3w_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3w_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3w_type(self) + + def depth(self): + return _ACD._Mat__Vec3w_depth(self) + + def channels(self): + return _ACD._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3w_swiginit(self, _ACD.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3w___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _ACD: +_ACD._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4w_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _ACD: +_ACD._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4w_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4w_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4w_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4w_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4w_type(self) + + def depth(self): + return _ACD._Mat__Vec4w_depth(self) + + def channels(self): + return _ACD._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4w_swiginit(self, _ACD.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4w___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _ACD: +_ACD._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__int_create(self, *args) + + def cross(self, m): + return _ACD._Mat__int_cross(self, m) + + def row(self, y): + return _ACD._Mat__int_row(self, y) + + def col(self, x): + return _ACD._Mat__int_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__int_diag(self, d) + + def clone(self): + return _ACD._Mat__int_clone(self) + + def elemSize(self): + return _ACD._Mat__int_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__int_elemSize1(self) + + def type(self): + return _ACD._Mat__int_type(self) + + def depth(self): + return _ACD._Mat__int_depth(self) + + def channels(self): + return _ACD._Mat__int_channels(self) + + def step1(self, i=0): + return _ACD._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__int___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__int_swiginit(self, _ACD.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__int___str__(self) + __swig_destroy__ = _ACD.delete__Mat__int + +# Register _Mat__int in _ACD: +_ACD._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2i_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _ACD: +_ACD._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2i_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2i_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2i_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2i_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2i_type(self) + + def depth(self): + return _ACD._Mat__Vec2i_depth(self) + + def channels(self): + return _ACD._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2i_swiginit(self, _ACD.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2i___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _ACD: +_ACD._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3i_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _ACD: +_ACD._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3i_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3i_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3i_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3i_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3i_type(self) + + def depth(self): + return _ACD._Mat__Vec3i_depth(self) + + def channels(self): + return _ACD._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3i_swiginit(self, _ACD.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3i___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _ACD: +_ACD._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4i_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _ACD: +_ACD._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4i_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4i_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4i_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4i_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4i_type(self) + + def depth(self): + return _ACD._Mat__Vec4i_depth(self) + + def channels(self): + return _ACD._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4i_swiginit(self, _ACD.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4i___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _ACD: +_ACD._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__float_create(self, *args) + + def cross(self, m): + return _ACD._Mat__float_cross(self, m) + + def row(self, y): + return _ACD._Mat__float_row(self, y) + + def col(self, x): + return _ACD._Mat__float_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__float_diag(self, d) + + def clone(self): + return _ACD._Mat__float_clone(self) + + def elemSize(self): + return _ACD._Mat__float_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__float_elemSize1(self) + + def type(self): + return _ACD._Mat__float_type(self) + + def depth(self): + return _ACD._Mat__float_depth(self) + + def channels(self): + return _ACD._Mat__float_channels(self) + + def step1(self, i=0): + return _ACD._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__float___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__float_swiginit(self, _ACD.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__float___str__(self) + __swig_destroy__ = _ACD.delete__Mat__float + +# Register _Mat__float in _ACD: +_ACD._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2f_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _ACD: +_ACD._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2f_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2f_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2f_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2f_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2f_type(self) + + def depth(self): + return _ACD._Mat__Vec2f_depth(self) + + def channels(self): + return _ACD._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2f_swiginit(self, _ACD.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2f___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _ACD: +_ACD._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3f_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _ACD: +_ACD._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3f_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3f_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3f_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3f_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3f_type(self) + + def depth(self): + return _ACD._Mat__Vec3f_depth(self) + + def channels(self): + return _ACD._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3f_swiginit(self, _ACD.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3f___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _ACD: +_ACD._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4f_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _ACD: +_ACD._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4f_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4f_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4f_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4f_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4f_type(self) + + def depth(self): + return _ACD._Mat__Vec4f_depth(self) + + def channels(self): + return _ACD._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4f_swiginit(self, _ACD.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4f___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _ACD: +_ACD._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__double_create(self, *args) + + def cross(self, m): + return _ACD._Mat__double_cross(self, m) + + def row(self, y): + return _ACD._Mat__double_row(self, y) + + def col(self, x): + return _ACD._Mat__double_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__double_diag(self, d) + + def clone(self): + return _ACD._Mat__double_clone(self) + + def elemSize(self): + return _ACD._Mat__double_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__double_elemSize1(self) + + def type(self): + return _ACD._Mat__double_type(self) + + def depth(self): + return _ACD._Mat__double_depth(self) + + def channels(self): + return _ACD._Mat__double_channels(self) + + def step1(self, i=0): + return _ACD._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__double___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__double_swiginit(self, _ACD.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__double___str__(self) + __swig_destroy__ = _ACD.delete__Mat__double + +# Register _Mat__double in _ACD: +_ACD._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2d_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _ACD: +_ACD._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2d_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2d_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2d_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2d_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2d_type(self) + + def depth(self): + return _ACD._Mat__Vec2d_depth(self) + + def channels(self): + return _ACD._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2d_swiginit(self, _ACD.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2d___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _ACD: +_ACD._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3d_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _ACD: +_ACD._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3d_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3d_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3d_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3d_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3d_type(self) + + def depth(self): + return _ACD._Mat__Vec3d_depth(self) + + def channels(self): + return _ACD._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3d_swiginit(self, _ACD.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3d___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _ACD: +_ACD._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4d_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _ACD: +_ACD._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4d_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4d_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4d_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4d_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4d_type(self) + + def depth(self): + return _ACD._Mat__Vec4d_depth(self) + + def channels(self): + return _ACD._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4d_swiginit(self, _ACD.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4d___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _ACD: +_ACD._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_1_2_rows + cols = _ACD._Matx_float_1_2_cols + channels = _ACD._Matx_float_1_2_channels + shortdim = _ACD._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_1_2_ddot(self, v) + + def t(self): + return _ACD._Matx_float_1_2_t(self) + + def mul(self, a): + return _ACD._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_1_2___call__(self, i, j) + val = property(_ACD._Matx_float_1_2_val_get, _ACD._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_1_2_swiginit(self, _ACD.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_1_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _ACD: +_ACD._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _ACD._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _ACD._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _ACD._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _ACD._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _ACD._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _ACD._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_1_2_rows + cols = _ACD._Matx_double_1_2_cols + channels = _ACD._Matx_double_1_2_channels + shortdim = _ACD._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_1_2_ddot(self, v) + + def t(self): + return _ACD._Matx_double_1_2_t(self) + + def mul(self, a): + return _ACD._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_1_2___call__(self, i, j) + val = property(_ACD._Matx_double_1_2_val_get, _ACD._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_1_2_swiginit(self, _ACD.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_1_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _ACD: +_ACD._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _ACD._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _ACD._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _ACD._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _ACD._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _ACD._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _ACD._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_1_3_rows + cols = _ACD._Matx_float_1_3_cols + channels = _ACD._Matx_float_1_3_channels + shortdim = _ACD._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_1_3_ddot(self, v) + + def t(self): + return _ACD._Matx_float_1_3_t(self) + + def mul(self, a): + return _ACD._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_1_3___call__(self, i, j) + val = property(_ACD._Matx_float_1_3_val_get, _ACD._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_1_3_swiginit(self, _ACD.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_1_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _ACD: +_ACD._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _ACD._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _ACD._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _ACD._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _ACD._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _ACD._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _ACD._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_1_3_rows + cols = _ACD._Matx_double_1_3_cols + channels = _ACD._Matx_double_1_3_channels + shortdim = _ACD._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_1_3_ddot(self, v) + + def t(self): + return _ACD._Matx_double_1_3_t(self) + + def mul(self, a): + return _ACD._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_1_3___call__(self, i, j) + val = property(_ACD._Matx_double_1_3_val_get, _ACD._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_1_3_swiginit(self, _ACD.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_1_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _ACD: +_ACD._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _ACD._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _ACD._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _ACD._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _ACD._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _ACD._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _ACD._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_1_4_rows + cols = _ACD._Matx_float_1_4_cols + channels = _ACD._Matx_float_1_4_channels + shortdim = _ACD._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_1_4_ddot(self, v) + + def t(self): + return _ACD._Matx_float_1_4_t(self) + + def mul(self, a): + return _ACD._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_1_4___call__(self, i, j) + val = property(_ACD._Matx_float_1_4_val_get, _ACD._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_1_4_swiginit(self, _ACD.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_1_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _ACD: +_ACD._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _ACD._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _ACD._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _ACD._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _ACD._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _ACD._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _ACD._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_1_4_rows + cols = _ACD._Matx_double_1_4_cols + channels = _ACD._Matx_double_1_4_channels + shortdim = _ACD._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_1_4_ddot(self, v) + + def t(self): + return _ACD._Matx_double_1_4_t(self) + + def mul(self, a): + return _ACD._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_1_4___call__(self, i, j) + val = property(_ACD._Matx_double_1_4_val_get, _ACD._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_1_4_swiginit(self, _ACD.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_1_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _ACD: +_ACD._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _ACD._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _ACD._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _ACD._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _ACD._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _ACD._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _ACD._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_1_6_rows + cols = _ACD._Matx_float_1_6_cols + channels = _ACD._Matx_float_1_6_channels + shortdim = _ACD._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_1_6_ddot(self, v) + + def t(self): + return _ACD._Matx_float_1_6_t(self) + + def mul(self, a): + return _ACD._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_1_6___call__(self, i, j) + val = property(_ACD._Matx_float_1_6_val_get, _ACD._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_1_6_swiginit(self, _ACD.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_1_6___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _ACD: +_ACD._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _ACD._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _ACD._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _ACD._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _ACD._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _ACD._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _ACD._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_1_6_rows + cols = _ACD._Matx_double_1_6_cols + channels = _ACD._Matx_double_1_6_channels + shortdim = _ACD._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_1_6_ddot(self, v) + + def t(self): + return _ACD._Matx_double_1_6_t(self) + + def mul(self, a): + return _ACD._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_1_6___call__(self, i, j) + val = property(_ACD._Matx_double_1_6_val_get, _ACD._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_1_6_swiginit(self, _ACD.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_1_6___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _ACD: +_ACD._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _ACD._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _ACD._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _ACD._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _ACD._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _ACD._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _ACD._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_2_2_rows + cols = _ACD._Matx_float_2_2_cols + channels = _ACD._Matx_float_2_2_channels + shortdim = _ACD._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_2_2_ddot(self, v) + + def t(self): + return _ACD._Matx_float_2_2_t(self) + + def mul(self, a): + return _ACD._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_2_2___call__(self, i, j) + val = property(_ACD._Matx_float_2_2_val_get, _ACD._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_2_2_swiginit(self, _ACD.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_2_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _ACD: +_ACD._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _ACD._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _ACD._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _ACD._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _ACD._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _ACD._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _ACD._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_2_2_rows + cols = _ACD._Matx_double_2_2_cols + channels = _ACD._Matx_double_2_2_channels + shortdim = _ACD._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_2_2_ddot(self, v) + + def t(self): + return _ACD._Matx_double_2_2_t(self) + + def mul(self, a): + return _ACD._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_2_2___call__(self, i, j) + val = property(_ACD._Matx_double_2_2_val_get, _ACD._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_2_2_swiginit(self, _ACD.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_2_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _ACD: +_ACD._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _ACD._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _ACD._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _ACD._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _ACD._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _ACD._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _ACD._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_2_3_rows + cols = _ACD._Matx_float_2_3_cols + channels = _ACD._Matx_float_2_3_channels + shortdim = _ACD._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_2_3_ddot(self, v) + + def t(self): + return _ACD._Matx_float_2_3_t(self) + + def mul(self, a): + return _ACD._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_2_3___call__(self, i, j) + val = property(_ACD._Matx_float_2_3_val_get, _ACD._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_2_3_swiginit(self, _ACD.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_2_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _ACD: +_ACD._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _ACD._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _ACD._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _ACD._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _ACD._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _ACD._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _ACD._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_2_3_rows + cols = _ACD._Matx_double_2_3_cols + channels = _ACD._Matx_double_2_3_channels + shortdim = _ACD._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_2_3_ddot(self, v) + + def t(self): + return _ACD._Matx_double_2_3_t(self) + + def mul(self, a): + return _ACD._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_2_3___call__(self, i, j) + val = property(_ACD._Matx_double_2_3_val_get, _ACD._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_2_3_swiginit(self, _ACD.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_2_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _ACD: +_ACD._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _ACD._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _ACD._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _ACD._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _ACD._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _ACD._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _ACD._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_3_2_rows + cols = _ACD._Matx_float_3_2_cols + channels = _ACD._Matx_float_3_2_channels + shortdim = _ACD._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_3_2_ddot(self, v) + + def t(self): + return _ACD._Matx_float_3_2_t(self) + + def mul(self, a): + return _ACD._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_3_2___call__(self, i, j) + val = property(_ACD._Matx_float_3_2_val_get, _ACD._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_3_2_swiginit(self, _ACD.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_3_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _ACD: +_ACD._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _ACD._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _ACD._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _ACD._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _ACD._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _ACD._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _ACD._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_3_2_rows + cols = _ACD._Matx_double_3_2_cols + channels = _ACD._Matx_double_3_2_channels + shortdim = _ACD._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_3_2_ddot(self, v) + + def t(self): + return _ACD._Matx_double_3_2_t(self) + + def mul(self, a): + return _ACD._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_3_2___call__(self, i, j) + val = property(_ACD._Matx_double_3_2_val_get, _ACD._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_3_2_swiginit(self, _ACD.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_3_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _ACD: +_ACD._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _ACD._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _ACD._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _ACD._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _ACD._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _ACD._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _ACD._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_3_3_rows + cols = _ACD._Matx_float_3_3_cols + channels = _ACD._Matx_float_3_3_channels + shortdim = _ACD._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_3_3_ddot(self, v) + + def t(self): + return _ACD._Matx_float_3_3_t(self) + + def mul(self, a): + return _ACD._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_3_3___call__(self, i, j) + val = property(_ACD._Matx_float_3_3_val_get, _ACD._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_3_3_swiginit(self, _ACD.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_3_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _ACD: +_ACD._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _ACD._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _ACD._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _ACD._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _ACD._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _ACD._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _ACD._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_3_3_rows + cols = _ACD._Matx_double_3_3_cols + channels = _ACD._Matx_double_3_3_channels + shortdim = _ACD._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_3_3_ddot(self, v) + + def t(self): + return _ACD._Matx_double_3_3_t(self) + + def mul(self, a): + return _ACD._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_3_3___call__(self, i, j) + val = property(_ACD._Matx_double_3_3_val_get, _ACD._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_3_3_swiginit(self, _ACD.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_3_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _ACD: +_ACD._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _ACD._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _ACD._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _ACD._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _ACD._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _ACD._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _ACD._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_3_4_rows + cols = _ACD._Matx_float_3_4_cols + channels = _ACD._Matx_float_3_4_channels + shortdim = _ACD._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_3_4_ddot(self, v) + + def t(self): + return _ACD._Matx_float_3_4_t(self) + + def mul(self, a): + return _ACD._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_3_4___call__(self, i, j) + val = property(_ACD._Matx_float_3_4_val_get, _ACD._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_3_4_swiginit(self, _ACD.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_3_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _ACD: +_ACD._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _ACD._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _ACD._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _ACD._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _ACD._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _ACD._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _ACD._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_3_4_rows + cols = _ACD._Matx_double_3_4_cols + channels = _ACD._Matx_double_3_4_channels + shortdim = _ACD._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_3_4_ddot(self, v) + + def t(self): + return _ACD._Matx_double_3_4_t(self) + + def mul(self, a): + return _ACD._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_3_4___call__(self, i, j) + val = property(_ACD._Matx_double_3_4_val_get, _ACD._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_3_4_swiginit(self, _ACD.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_3_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _ACD: +_ACD._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _ACD._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _ACD._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _ACD._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _ACD._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _ACD._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _ACD._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_4_3_rows + cols = _ACD._Matx_float_4_3_cols + channels = _ACD._Matx_float_4_3_channels + shortdim = _ACD._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_4_3_ddot(self, v) + + def t(self): + return _ACD._Matx_float_4_3_t(self) + + def mul(self, a): + return _ACD._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_4_3___call__(self, i, j) + val = property(_ACD._Matx_float_4_3_val_get, _ACD._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_4_3_swiginit(self, _ACD.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_4_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _ACD: +_ACD._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _ACD._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _ACD._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _ACD._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _ACD._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _ACD._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _ACD._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_4_3_rows + cols = _ACD._Matx_double_4_3_cols + channels = _ACD._Matx_double_4_3_channels + shortdim = _ACD._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_4_3_ddot(self, v) + + def t(self): + return _ACD._Matx_double_4_3_t(self) + + def mul(self, a): + return _ACD._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_4_3___call__(self, i, j) + val = property(_ACD._Matx_double_4_3_val_get, _ACD._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_4_3_swiginit(self, _ACD.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_4_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _ACD: +_ACD._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _ACD._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _ACD._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _ACD._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _ACD._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _ACD._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _ACD._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_4_4_rows + cols = _ACD._Matx_float_4_4_cols + channels = _ACD._Matx_float_4_4_channels + shortdim = _ACD._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_4_4_ddot(self, v) + + def t(self): + return _ACD._Matx_float_4_4_t(self) + + def mul(self, a): + return _ACD._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_4_4___call__(self, i, j) + val = property(_ACD._Matx_float_4_4_val_get, _ACD._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_4_4_swiginit(self, _ACD.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_4_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _ACD: +_ACD._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _ACD._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _ACD._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _ACD._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _ACD._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _ACD._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _ACD._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_4_4_rows + cols = _ACD._Matx_double_4_4_cols + channels = _ACD._Matx_double_4_4_channels + shortdim = _ACD._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_4_4_ddot(self, v) + + def t(self): + return _ACD._Matx_double_4_4_t(self) + + def mul(self, a): + return _ACD._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_4_4___call__(self, i, j) + val = property(_ACD._Matx_double_4_4_val_get, _ACD._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_4_4_swiginit(self, _ACD.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_4_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _ACD: +_ACD._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _ACD._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _ACD._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _ACD._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _ACD._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _ACD._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _ACD._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_6_6_rows + cols = _ACD._Matx_float_6_6_cols + channels = _ACD._Matx_float_6_6_channels + shortdim = _ACD._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_6_6_ddot(self, v) + + def t(self): + return _ACD._Matx_float_6_6_t(self) + + def mul(self, a): + return _ACD._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_6_6___call__(self, i, j) + val = property(_ACD._Matx_float_6_6_val_get, _ACD._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_6_6_swiginit(self, _ACD.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_6_6___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _ACD: +_ACD._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _ACD._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _ACD._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _ACD._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _ACD._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _ACD._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _ACD._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_6_6_rows + cols = _ACD._Matx_double_6_6_cols + channels = _ACD._Matx_double_6_6_channels + shortdim = _ACD._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_6_6_ddot(self, v) + + def t(self): + return _ACD._Matx_double_6_6_t(self) + + def mul(self, a): + return _ACD._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_6_6___call__(self, i, j) + val = property(_ACD._Matx_double_6_6_val_get, _ACD._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_6_6_swiginit(self, _ACD.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_6_6___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _ACD: +_ACD._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _ACD._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _ACD._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _ACD._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _ACD._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _ACD._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _ACD._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Point__int_swiginit(self, _ACD.new__Point__int(*args)) + + def dot(self, pt): + return _ACD._Point__int_dot(self, pt) + + def ddot(self, pt): + return _ACD._Point__int_ddot(self, pt) + + def cross(self, pt): + return _ACD._Point__int_cross(self, pt) + x = property(_ACD._Point__int_x_get, _ACD._Point__int_x_set) + y = property(_ACD._Point__int_y_get, _ACD._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _ACD._Point__int___str__(self) + __swig_destroy__ = _ACD.delete__Point__int + +# Register _Point__int in _ACD: +_ACD._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Point__float_swiginit(self, _ACD.new__Point__float(*args)) + + def dot(self, pt): + return _ACD._Point__float_dot(self, pt) + + def ddot(self, pt): + return _ACD._Point__float_ddot(self, pt) + + def cross(self, pt): + return _ACD._Point__float_cross(self, pt) + x = property(_ACD._Point__float_x_get, _ACD._Point__float_x_set) + y = property(_ACD._Point__float_y_get, _ACD._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _ACD._Point__float___str__(self) + __swig_destroy__ = _ACD.delete__Point__float + +# Register _Point__float in _ACD: +_ACD._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Point__double_swiginit(self, _ACD.new__Point__double(*args)) + + def dot(self, pt): + return _ACD._Point__double_dot(self, pt) + + def ddot(self, pt): + return _ACD._Point__double_ddot(self, pt) + + def cross(self, pt): + return _ACD._Point__double_cross(self, pt) + x = property(_ACD._Point__double_x_get, _ACD._Point__double_x_set) + y = property(_ACD._Point__double_y_get, _ACD._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _ACD._Point__double___str__(self) + __swig_destroy__ = _ACD.delete__Point__double + +# Register _Point__double in _ACD: +_ACD._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Rect__int_swiginit(self, _ACD.new__Rect__int(*args)) + + def tl(self): + return _ACD._Rect__int_tl(self) + + def br(self): + return _ACD._Rect__int_br(self) + + def size(self): + return _ACD._Rect__int_size(self) + + def area(self): + return _ACD._Rect__int_area(self) + + def contains(self, pt): + return _ACD._Rect__int_contains(self, pt) + x = property(_ACD._Rect__int_x_get, _ACD._Rect__int_x_set) + y = property(_ACD._Rect__int_y_get, _ACD._Rect__int_y_set) + width = property(_ACD._Rect__int_width_get, _ACD._Rect__int_width_set) + height = property(_ACD._Rect__int_height_get, _ACD._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _ACD._Rect__int___str__(self) + __swig_destroy__ = _ACD.delete__Rect__int + +# Register _Rect__int in _ACD: +_ACD._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Rect__float_swiginit(self, _ACD.new__Rect__float(*args)) + + def tl(self): + return _ACD._Rect__float_tl(self) + + def br(self): + return _ACD._Rect__float_br(self) + + def size(self): + return _ACD._Rect__float_size(self) + + def area(self): + return _ACD._Rect__float_area(self) + + def contains(self, pt): + return _ACD._Rect__float_contains(self, pt) + x = property(_ACD._Rect__float_x_get, _ACD._Rect__float_x_set) + y = property(_ACD._Rect__float_y_get, _ACD._Rect__float_y_set) + width = property(_ACD._Rect__float_width_get, _ACD._Rect__float_width_set) + height = property(_ACD._Rect__float_height_get, _ACD._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _ACD._Rect__float___str__(self) + __swig_destroy__ = _ACD.delete__Rect__float + +# Register _Rect__float in _ACD: +_ACD._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Rect__double_swiginit(self, _ACD.new__Rect__double(*args)) + + def tl(self): + return _ACD._Rect__double_tl(self) + + def br(self): + return _ACD._Rect__double_br(self) + + def size(self): + return _ACD._Rect__double_size(self) + + def area(self): + return _ACD._Rect__double_area(self) + + def contains(self, pt): + return _ACD._Rect__double_contains(self, pt) + x = property(_ACD._Rect__double_x_get, _ACD._Rect__double_x_set) + y = property(_ACD._Rect__double_y_get, _ACD._Rect__double_y_set) + width = property(_ACD._Rect__double_width_get, _ACD._Rect__double_width_set) + height = property(_ACD._Rect__double_height_get, _ACD._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _ACD._Rect__double___str__(self) + __swig_destroy__ = _ACD.delete__Rect__double + +# Register _Rect__double in _ACD: +_ACD._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Scalar__double_swiginit(self, _ACD.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _ACD._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _ACD._Scalar__double_mul(self, a, scale) + + def conj(self): + return _ACD._Scalar__double_conj(self) + + def isReal(self): + return _ACD._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Scalar__double___str__(self) + __swig_destroy__ = _ACD.delete__Scalar__double + +# Register _Scalar__double in _ACD: +_ACD._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _ACD._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Size__int_swiginit(self, _ACD.new__Size__int(*args)) + + def area(self): + return _ACD._Size__int_area(self) + width = property(_ACD._Size__int_width_get, _ACD._Size__int_width_set) + height = property(_ACD._Size__int_height_get, _ACD._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _ACD._Size__int___str__(self) + __swig_destroy__ = _ACD.delete__Size__int + +# Register _Size__int in _ACD: +_ACD._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Size__float_swiginit(self, _ACD.new__Size__float(*args)) + + def area(self): + return _ACD._Size__float_area(self) + width = property(_ACD._Size__float_width_get, _ACD._Size__float_width_set) + height = property(_ACD._Size__float_height_get, _ACD._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _ACD._Size__float___str__(self) + __swig_destroy__ = _ACD.delete__Size__float + +# Register _Size__float in _ACD: +_ACD._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Size__double_swiginit(self, _ACD.new__Size__double(*args)) + + def area(self): + return _ACD._Size__double_area(self) + width = property(_ACD._Size__double_width_get, _ACD._Size__double_width_set) + height = property(_ACD._Size__double_height_get, _ACD._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _ACD._Size__double___str__(self) + __swig_destroy__ = _ACD.delete__Size__double + +# Register _Size__double in _ACD: +_ACD._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def ACD(file1, file2, outfile): + return _ACD.ACD(file1, file2, outfile) + + diff --git a/plugins/unsupervised_method/scripts/AHT.py b/plugins/unsupervised_method/scripts/AHT.py new file mode 100644 index 0000000..388a8a5 --- /dev/null +++ b/plugins/unsupervised_method/scripts/AHT.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _AHT +else: + import _AHT + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _AHT.CV_VERSION_MAJOR +CV_VERSION_MINOR = _AHT.CV_VERSION_MINOR +CV_VERSION_REVISION = _AHT.CV_VERSION_REVISION +CV_VERSION_STATUS = _AHT.CV_VERSION_STATUS +CV_VERSION = _AHT.CV_VERSION +CV_MAJOR_VERSION = _AHT.CV_MAJOR_VERSION +CV_MINOR_VERSION = _AHT.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _AHT.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_bool_generic_type + channels = _AHT.DataType_bool_channels + fmt = _AHT.DataType_bool_fmt + + def __init__(self): + _AHT.DataType_bool_swiginit(self, _AHT.new_DataType_bool()) + __swig_destroy__ = _AHT.delete_DataType_bool + +# Register DataType_bool in _AHT: +_AHT.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_uchar_generic_type + channels = _AHT.DataType_uchar_channels + fmt = _AHT.DataType_uchar_fmt + + def __init__(self): + _AHT.DataType_uchar_swiginit(self, _AHT.new_DataType_uchar()) + __swig_destroy__ = _AHT.delete_DataType_uchar + +# Register DataType_uchar in _AHT: +_AHT.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_schar_generic_type + channels = _AHT.DataType_schar_channels + fmt = _AHT.DataType_schar_fmt + + def __init__(self): + _AHT.DataType_schar_swiginit(self, _AHT.new_DataType_schar()) + __swig_destroy__ = _AHT.delete_DataType_schar + +# Register DataType_schar in _AHT: +_AHT.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_char_generic_type + channels = _AHT.DataType_char_channels + fmt = _AHT.DataType_char_fmt + + def __init__(self): + _AHT.DataType_char_swiginit(self, _AHT.new_DataType_char()) + __swig_destroy__ = _AHT.delete_DataType_char + +# Register DataType_char in _AHT: +_AHT.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_ushort_generic_type + channels = _AHT.DataType_ushort_channels + fmt = _AHT.DataType_ushort_fmt + + def __init__(self): + _AHT.DataType_ushort_swiginit(self, _AHT.new_DataType_ushort()) + __swig_destroy__ = _AHT.delete_DataType_ushort + +# Register DataType_ushort in _AHT: +_AHT.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_short_generic_type + channels = _AHT.DataType_short_channels + fmt = _AHT.DataType_short_fmt + + def __init__(self): + _AHT.DataType_short_swiginit(self, _AHT.new_DataType_short()) + __swig_destroy__ = _AHT.delete_DataType_short + +# Register DataType_short in _AHT: +_AHT.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_int_generic_type + channels = _AHT.DataType_int_channels + fmt = _AHT.DataType_int_fmt + + def __init__(self): + _AHT.DataType_int_swiginit(self, _AHT.new_DataType_int()) + __swig_destroy__ = _AHT.delete_DataType_int + +# Register DataType_int in _AHT: +_AHT.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_float_generic_type + channels = _AHT.DataType_float_channels + fmt = _AHT.DataType_float_fmt + + def __init__(self): + _AHT.DataType_float_swiginit(self, _AHT.new_DataType_float()) + __swig_destroy__ = _AHT.delete_DataType_float + +# Register DataType_float in _AHT: +_AHT.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_double_generic_type + channels = _AHT.DataType_double_channels + fmt = _AHT.DataType_double_fmt + + def __init__(self): + _AHT.DataType_double_swiginit(self, _AHT.new_DataType_double()) + __swig_destroy__ = _AHT.delete_DataType_double + +# Register DataType_double in _AHT: +_AHT.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT.Range_swiginit(self, _AHT.new_Range(*args)) + + def size(self): + return _AHT.Range_size(self) + + def empty(self): + return _AHT.Range_empty(self) + + @staticmethod + def all(): + return _AHT.Range_all() + start = property(_AHT.Range_start_get, _AHT.Range_start_set) + end = property(_AHT.Range_end_get, _AHT.Range_end_set) + __swig_destroy__ = _AHT.delete_Range + +# Register Range in _AHT: +_AHT.Range_swigregister(Range) + +def Range_all(): + return _AHT.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _AHT.delete_SwigPyIterator + + def value(self): + return _AHT.SwigPyIterator_value(self) + + def incr(self, n=1): + return _AHT.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _AHT.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _AHT.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _AHT.SwigPyIterator_equal(self, x) + + def copy(self): + return _AHT.SwigPyIterator_copy(self) + + def next(self): + return _AHT.SwigPyIterator_next(self) + + def __next__(self): + return _AHT.SwigPyIterator___next__(self) + + def previous(self): + return _AHT.SwigPyIterator_previous(self) + + def advance(self, n): + return _AHT.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _AHT.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _AHT.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _AHT.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _AHT.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _AHT.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _AHT.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _AHT: +_AHT.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_AddOp_swiginit(self, _AHT.new_Matx_AddOp()) + __swig_destroy__ = _AHT.delete_Matx_AddOp + +# Register Matx_AddOp in _AHT: +_AHT.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_SubOp_swiginit(self, _AHT.new_Matx_SubOp()) + __swig_destroy__ = _AHT.delete_Matx_SubOp + +# Register Matx_SubOp in _AHT: +_AHT.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_ScaleOp_swiginit(self, _AHT.new_Matx_ScaleOp()) + __swig_destroy__ = _AHT.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _AHT: +_AHT.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_MulOp_swiginit(self, _AHT.new_Matx_MulOp()) + __swig_destroy__ = _AHT.delete_Matx_MulOp + +# Register Matx_MulOp in _AHT: +_AHT.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_DivOp_swiginit(self, _AHT.new_Matx_DivOp()) + __swig_destroy__ = _AHT.delete_Matx_DivOp + +# Register Matx_DivOp in _AHT: +_AHT.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_MatMulOp_swiginit(self, _AHT.new_Matx_MatMulOp()) + __swig_destroy__ = _AHT.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _AHT: +_AHT.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_TOp_swiginit(self, _AHT.new_Matx_TOp()) + __swig_destroy__ = _AHT.delete_Matx_TOp + +# Register Matx_TOp in _AHT: +_AHT.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _AHT.delete_Mat + + def row(self, y): + return _AHT.Mat_row(self, y) + + def col(self, x): + return _AHT.Mat_col(self, x) + + def rowRange(self, *args): + return _AHT.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _AHT.Mat_colRange(self, *args) + + def diag(self, d=0): + return _AHT.Mat_diag(self, d) + + def clone(self): + return _AHT.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _AHT.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _AHT.Mat_reshape(self, *args) + + def create(self, *args): + return _AHT.Mat_create(self, *args) + + def addref(self): + return _AHT.Mat_addref(self) + + def release(self): + return _AHT.Mat_release(self) + + def deallocate(self): + return _AHT.Mat_deallocate(self) + + def copySize(self, m): + return _AHT.Mat_copySize(self, m) + + def reserve(self, sz): + return _AHT.Mat_reserve(self, sz) + + def resize(self, *args): + return _AHT.Mat_resize(self, *args) + + def push_back_(self, elem): + return _AHT.Mat_push_back_(self, elem) + + def push_back(self, m): + return _AHT.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _AHT.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _AHT.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT.Mat___call__(self, *args) + + def isContinuous(self): + return _AHT.Mat_isContinuous(self) + + def isSubmatrix(self): + return _AHT.Mat_isSubmatrix(self) + + def elemSize(self): + return _AHT.Mat_elemSize(self) + + def elemSize1(self): + return _AHT.Mat_elemSize1(self) + + def type(self): + return _AHT.Mat_type(self) + + def depth(self): + return _AHT.Mat_depth(self) + + def channels(self): + return _AHT.Mat_channels(self) + + def step1(self, i=0): + return _AHT.Mat_step1(self, i) + + def empty(self): + return _AHT.Mat_empty(self) + + def total(self): + return _AHT.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _AHT.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _AHT.Mat_ptr(self, *args) + MAGIC_VAL = _AHT.Mat_MAGIC_VAL + AUTO_STEP = _AHT.Mat_AUTO_STEP + CONTINUOUS_FLAG = _AHT.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _AHT.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _AHT.Mat_MAGIC_MASK + TYPE_MASK = _AHT.Mat_TYPE_MASK + DEPTH_MASK = _AHT.Mat_DEPTH_MASK + flags = property(_AHT.Mat_flags_get, _AHT.Mat_flags_set) + dims = property(_AHT.Mat_dims_get, _AHT.Mat_dims_set) + rows = property(_AHT.Mat_rows_get, _AHT.Mat_rows_set) + cols = property(_AHT.Mat_cols_get, _AHT.Mat_cols_set) + data = property(_AHT.Mat_data_get, _AHT.Mat_data_set) + datastart = property(_AHT.Mat_datastart_get, _AHT.Mat_datastart_set) + dataend = property(_AHT.Mat_dataend_get, _AHT.Mat_dataend_set) + datalimit = property(_AHT.Mat_datalimit_get, _AHT.Mat_datalimit_set) + + def __init__(self, *args): + _AHT.Mat_swiginit(self, _AHT.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT.Mat___str__(self) + +# Register Mat in _AHT: +_AHT.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _AHT._cv_numpy_sizeof_uint8_t_swiginit(self, _AHT.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _AHT: +_AHT._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _AHT.uint8_tArray___bool__(self) + + def __len__(self): + return _AHT.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _AHT.uint8_tArray_pop(self) + + def append(self, x): + return _AHT.uint8_tArray_append(self, x) + + def empty(self): + return _AHT.uint8_tArray_empty(self) + + def size(self): + return _AHT.uint8_tArray_size(self) + + def swap(self, v): + return _AHT.uint8_tArray_swap(self, v) + + def begin(self): + return _AHT.uint8_tArray_begin(self) + + def end(self): + return _AHT.uint8_tArray_end(self) + + def rbegin(self): + return _AHT.uint8_tArray_rbegin(self) + + def rend(self): + return _AHT.uint8_tArray_rend(self) + + def clear(self): + return _AHT.uint8_tArray_clear(self) + + def get_allocator(self): + return _AHT.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _AHT.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _AHT.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _AHT.uint8_tArray_swiginit(self, _AHT.new_uint8_tArray(*args)) + + def push_back(self, x): + return _AHT.uint8_tArray_push_back(self, x) + + def front(self): + return _AHT.uint8_tArray_front(self) + + def back(self): + return _AHT.uint8_tArray_back(self) + + def assign(self, n, x): + return _AHT.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _AHT.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _AHT.uint8_tArray_reserve(self, n) + + def capacity(self): + return _AHT.uint8_tArray_capacity(self) + __swig_destroy__ = _AHT.delete_uint8_tArray + +# Register uint8_tArray in _AHT: +_AHT.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_uint8_t_2_1_rows + cols = _AHT._Matx_uint8_t_2_1_cols + channels = _AHT._Matx_uint8_t_2_1_channels + shortdim = _AHT._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_AHT._Matx_uint8_t_2_1_val_get, _AHT._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_uint8_t_2_1_swiginit(self, _AHT.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _AHT: +_AHT._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _AHT._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _AHT._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _AHT._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _AHT._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _AHT._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _AHT._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_uint8_t_2_swiginit(self, _AHT.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _AHT: +_AHT._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _AHT._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_uint8_t_2_generic_type + channels = _AHT._DataType_Vec_uint8_t_2_channels + fmt = _AHT._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _AHT._DataType_Vec_uint8_t_2_swiginit(self, _AHT.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _AHT: +_AHT._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_uint8_t_3_1_rows + cols = _AHT._Matx_uint8_t_3_1_cols + channels = _AHT._Matx_uint8_t_3_1_channels + shortdim = _AHT._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_AHT._Matx_uint8_t_3_1_val_get, _AHT._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_uint8_t_3_1_swiginit(self, _AHT.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _AHT: +_AHT._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _AHT._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _AHT._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _AHT._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _AHT._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _AHT._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _AHT._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_uint8_t_3_swiginit(self, _AHT.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _AHT: +_AHT._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _AHT._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_uint8_t_3_generic_type + channels = _AHT._DataType_Vec_uint8_t_3_channels + fmt = _AHT._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _AHT._DataType_Vec_uint8_t_3_swiginit(self, _AHT.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _AHT: +_AHT._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_uint8_t_4_1_rows + cols = _AHT._Matx_uint8_t_4_1_cols + channels = _AHT._Matx_uint8_t_4_1_channels + shortdim = _AHT._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_AHT._Matx_uint8_t_4_1_val_get, _AHT._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_uint8_t_4_1_swiginit(self, _AHT.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _AHT: +_AHT._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _AHT._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _AHT._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _AHT._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _AHT._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _AHT._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _AHT._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_uint8_t_4_swiginit(self, _AHT.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _AHT: +_AHT._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _AHT._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_uint8_t_4_generic_type + channels = _AHT._DataType_Vec_uint8_t_4_channels + fmt = _AHT._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _AHT._DataType_Vec_uint8_t_4_swiginit(self, _AHT.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _AHT: +_AHT._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_short_value + + def __init__(self): + _AHT._cv_numpy_sizeof_short_swiginit(self, _AHT.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _AHT: +_AHT._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.shortArray___nonzero__(self) + + def __bool__(self): + return _AHT.shortArray___bool__(self) + + def __len__(self): + return _AHT.shortArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.shortArray___setitem__(self, *args) + + def pop(self): + return _AHT.shortArray_pop(self) + + def append(self, x): + return _AHT.shortArray_append(self, x) + + def empty(self): + return _AHT.shortArray_empty(self) + + def size(self): + return _AHT.shortArray_size(self) + + def swap(self, v): + return _AHT.shortArray_swap(self, v) + + def begin(self): + return _AHT.shortArray_begin(self) + + def end(self): + return _AHT.shortArray_end(self) + + def rbegin(self): + return _AHT.shortArray_rbegin(self) + + def rend(self): + return _AHT.shortArray_rend(self) + + def clear(self): + return _AHT.shortArray_clear(self) + + def get_allocator(self): + return _AHT.shortArray_get_allocator(self) + + def pop_back(self): + return _AHT.shortArray_pop_back(self) + + def erase(self, *args): + return _AHT.shortArray_erase(self, *args) + + def __init__(self, *args): + _AHT.shortArray_swiginit(self, _AHT.new_shortArray(*args)) + + def push_back(self, x): + return _AHT.shortArray_push_back(self, x) + + def front(self): + return _AHT.shortArray_front(self) + + def back(self): + return _AHT.shortArray_back(self) + + def assign(self, n, x): + return _AHT.shortArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.shortArray_resize(self, *args) + + def insert(self, *args): + return _AHT.shortArray_insert(self, *args) + + def reserve(self, n): + return _AHT.shortArray_reserve(self, n) + + def capacity(self): + return _AHT.shortArray_capacity(self) + __swig_destroy__ = _AHT.delete_shortArray + +# Register shortArray in _AHT: +_AHT.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_short_2_1_rows + cols = _AHT._Matx_short_2_1_cols + channels = _AHT._Matx_short_2_1_channels + shortdim = _AHT._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_short_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_short_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_short_2_1___call__(self, i, j) + val = property(_AHT._Matx_short_2_1_val_get, _AHT._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_short_2_1_swiginit(self, _AHT.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_short_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _AHT: +_AHT._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _AHT._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _AHT._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _AHT._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _AHT._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _AHT._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _AHT._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_short_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_short_2_swiginit(self, _AHT.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_short_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_short_2 + +# Register _Vec_short_2 in _AHT: +_AHT._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _AHT._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_short_2_generic_type + channels = _AHT._DataType_Vec_short_2_channels + fmt = _AHT._DataType_Vec_short_2_fmt + + def __init__(self): + _AHT._DataType_Vec_short_2_swiginit(self, _AHT.new__DataType_Vec_short_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _AHT: +_AHT._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_short_3_1_rows + cols = _AHT._Matx_short_3_1_cols + channels = _AHT._Matx_short_3_1_channels + shortdim = _AHT._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_short_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_short_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_short_3_1___call__(self, i, j) + val = property(_AHT._Matx_short_3_1_val_get, _AHT._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_short_3_1_swiginit(self, _AHT.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_short_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _AHT: +_AHT._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _AHT._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _AHT._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _AHT._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _AHT._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _AHT._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _AHT._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_short_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_short_3_swiginit(self, _AHT.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_short_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_short_3 + +# Register _Vec_short_3 in _AHT: +_AHT._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _AHT._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_short_3_generic_type + channels = _AHT._DataType_Vec_short_3_channels + fmt = _AHT._DataType_Vec_short_3_fmt + + def __init__(self): + _AHT._DataType_Vec_short_3_swiginit(self, _AHT.new__DataType_Vec_short_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _AHT: +_AHT._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_short_4_1_rows + cols = _AHT._Matx_short_4_1_cols + channels = _AHT._Matx_short_4_1_channels + shortdim = _AHT._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_short_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_short_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_short_4_1___call__(self, i, j) + val = property(_AHT._Matx_short_4_1_val_get, _AHT._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_short_4_1_swiginit(self, _AHT.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_short_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _AHT: +_AHT._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _AHT._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _AHT._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _AHT._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _AHT._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _AHT._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _AHT._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_short_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_short_4_swiginit(self, _AHT.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_short_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_short_4 + +# Register _Vec_short_4 in _AHT: +_AHT._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _AHT._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_short_4_generic_type + channels = _AHT._DataType_Vec_short_4_channels + fmt = _AHT._DataType_Vec_short_4_fmt + + def __init__(self): + _AHT._DataType_Vec_short_4_swiginit(self, _AHT.new__DataType_Vec_short_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _AHT: +_AHT._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_ushort_value + + def __init__(self): + _AHT._cv_numpy_sizeof_ushort_swiginit(self, _AHT.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _AHT: +_AHT._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.ushortArray___nonzero__(self) + + def __bool__(self): + return _AHT.ushortArray___bool__(self) + + def __len__(self): + return _AHT.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.ushortArray___setitem__(self, *args) + + def pop(self): + return _AHT.ushortArray_pop(self) + + def append(self, x): + return _AHT.ushortArray_append(self, x) + + def empty(self): + return _AHT.ushortArray_empty(self) + + def size(self): + return _AHT.ushortArray_size(self) + + def swap(self, v): + return _AHT.ushortArray_swap(self, v) + + def begin(self): + return _AHT.ushortArray_begin(self) + + def end(self): + return _AHT.ushortArray_end(self) + + def rbegin(self): + return _AHT.ushortArray_rbegin(self) + + def rend(self): + return _AHT.ushortArray_rend(self) + + def clear(self): + return _AHT.ushortArray_clear(self) + + def get_allocator(self): + return _AHT.ushortArray_get_allocator(self) + + def pop_back(self): + return _AHT.ushortArray_pop_back(self) + + def erase(self, *args): + return _AHT.ushortArray_erase(self, *args) + + def __init__(self, *args): + _AHT.ushortArray_swiginit(self, _AHT.new_ushortArray(*args)) + + def push_back(self, x): + return _AHT.ushortArray_push_back(self, x) + + def front(self): + return _AHT.ushortArray_front(self) + + def back(self): + return _AHT.ushortArray_back(self) + + def assign(self, n, x): + return _AHT.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.ushortArray_resize(self, *args) + + def insert(self, *args): + return _AHT.ushortArray_insert(self, *args) + + def reserve(self, n): + return _AHT.ushortArray_reserve(self, n) + + def capacity(self): + return _AHT.ushortArray_capacity(self) + __swig_destroy__ = _AHT.delete_ushortArray + +# Register ushortArray in _AHT: +_AHT.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_ushort_2_1_rows + cols = _AHT._Matx_ushort_2_1_cols + channels = _AHT._Matx_ushort_2_1_channels + shortdim = _AHT._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_ushort_2_1___call__(self, i, j) + val = property(_AHT._Matx_ushort_2_1_val_get, _AHT._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_ushort_2_1_swiginit(self, _AHT.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _AHT: +_AHT._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _AHT._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _AHT._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _AHT._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _AHT._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _AHT._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _AHT._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_ushort_2_swiginit(self, _AHT.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_ushort_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _AHT: +_AHT._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _AHT._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_ushort_2_generic_type + channels = _AHT._DataType_Vec_ushort_2_channels + fmt = _AHT._DataType_Vec_ushort_2_fmt + + def __init__(self): + _AHT._DataType_Vec_ushort_2_swiginit(self, _AHT.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _AHT: +_AHT._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_ushort_3_1_rows + cols = _AHT._Matx_ushort_3_1_cols + channels = _AHT._Matx_ushort_3_1_channels + shortdim = _AHT._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_ushort_3_1___call__(self, i, j) + val = property(_AHT._Matx_ushort_3_1_val_get, _AHT._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_ushort_3_1_swiginit(self, _AHT.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _AHT: +_AHT._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _AHT._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _AHT._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _AHT._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _AHT._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _AHT._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _AHT._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_ushort_3_swiginit(self, _AHT.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_ushort_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _AHT: +_AHT._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _AHT._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_ushort_3_generic_type + channels = _AHT._DataType_Vec_ushort_3_channels + fmt = _AHT._DataType_Vec_ushort_3_fmt + + def __init__(self): + _AHT._DataType_Vec_ushort_3_swiginit(self, _AHT.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _AHT: +_AHT._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_ushort_4_1_rows + cols = _AHT._Matx_ushort_4_1_cols + channels = _AHT._Matx_ushort_4_1_channels + shortdim = _AHT._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_ushort_4_1___call__(self, i, j) + val = property(_AHT._Matx_ushort_4_1_val_get, _AHT._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_ushort_4_1_swiginit(self, _AHT.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _AHT: +_AHT._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _AHT._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _AHT._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _AHT._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _AHT._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _AHT._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _AHT._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_ushort_4_swiginit(self, _AHT.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_ushort_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _AHT: +_AHT._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _AHT._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_ushort_4_generic_type + channels = _AHT._DataType_Vec_ushort_4_channels + fmt = _AHT._DataType_Vec_ushort_4_fmt + + def __init__(self): + _AHT._DataType_Vec_ushort_4_swiginit(self, _AHT.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _AHT: +_AHT._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_int_value + + def __init__(self): + _AHT._cv_numpy_sizeof_int_swiginit(self, _AHT.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _AHT: +_AHT._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.intArray___nonzero__(self) + + def __bool__(self): + return _AHT.intArray___bool__(self) + + def __len__(self): + return _AHT.intArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.intArray___setitem__(self, *args) + + def pop(self): + return _AHT.intArray_pop(self) + + def append(self, x): + return _AHT.intArray_append(self, x) + + def empty(self): + return _AHT.intArray_empty(self) + + def size(self): + return _AHT.intArray_size(self) + + def swap(self, v): + return _AHT.intArray_swap(self, v) + + def begin(self): + return _AHT.intArray_begin(self) + + def end(self): + return _AHT.intArray_end(self) + + def rbegin(self): + return _AHT.intArray_rbegin(self) + + def rend(self): + return _AHT.intArray_rend(self) + + def clear(self): + return _AHT.intArray_clear(self) + + def get_allocator(self): + return _AHT.intArray_get_allocator(self) + + def pop_back(self): + return _AHT.intArray_pop_back(self) + + def erase(self, *args): + return _AHT.intArray_erase(self, *args) + + def __init__(self, *args): + _AHT.intArray_swiginit(self, _AHT.new_intArray(*args)) + + def push_back(self, x): + return _AHT.intArray_push_back(self, x) + + def front(self): + return _AHT.intArray_front(self) + + def back(self): + return _AHT.intArray_back(self) + + def assign(self, n, x): + return _AHT.intArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.intArray_resize(self, *args) + + def insert(self, *args): + return _AHT.intArray_insert(self, *args) + + def reserve(self, n): + return _AHT.intArray_reserve(self, n) + + def capacity(self): + return _AHT.intArray_capacity(self) + __swig_destroy__ = _AHT.delete_intArray + +# Register intArray in _AHT: +_AHT.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_2_1_rows + cols = _AHT._Matx_int_2_1_cols + channels = _AHT._Matx_int_2_1_channels + shortdim = _AHT._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_2_1___call__(self, i, j) + val = property(_AHT._Matx_int_2_1_val_get, _AHT._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_2_1_swiginit(self, _AHT.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _AHT: +_AHT._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _AHT._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _AHT._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _AHT._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _AHT._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _AHT._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _AHT._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_2_swiginit(self, _AHT.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_2 + +# Register _Vec_int_2 in _AHT: +_AHT._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _AHT._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_2_generic_type + channels = _AHT._DataType_Vec_int_2_channels + fmt = _AHT._DataType_Vec_int_2_fmt + + def __init__(self): + _AHT._DataType_Vec_int_2_swiginit(self, _AHT.new__DataType_Vec_int_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _AHT: +_AHT._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_3_1_rows + cols = _AHT._Matx_int_3_1_cols + channels = _AHT._Matx_int_3_1_channels + shortdim = _AHT._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_3_1___call__(self, i, j) + val = property(_AHT._Matx_int_3_1_val_get, _AHT._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_3_1_swiginit(self, _AHT.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _AHT: +_AHT._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _AHT._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _AHT._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _AHT._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _AHT._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _AHT._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _AHT._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_3_swiginit(self, _AHT.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_3 + +# Register _Vec_int_3 in _AHT: +_AHT._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _AHT._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_3_generic_type + channels = _AHT._DataType_Vec_int_3_channels + fmt = _AHT._DataType_Vec_int_3_fmt + + def __init__(self): + _AHT._DataType_Vec_int_3_swiginit(self, _AHT.new__DataType_Vec_int_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _AHT: +_AHT._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_4_1_rows + cols = _AHT._Matx_int_4_1_cols + channels = _AHT._Matx_int_4_1_channels + shortdim = _AHT._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_4_1___call__(self, i, j) + val = property(_AHT._Matx_int_4_1_val_get, _AHT._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_4_1_swiginit(self, _AHT.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _AHT: +_AHT._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _AHT._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _AHT._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _AHT._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _AHT._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _AHT._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _AHT._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_4_swiginit(self, _AHT.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_4 + +# Register _Vec_int_4 in _AHT: +_AHT._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _AHT._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_4_generic_type + channels = _AHT._DataType_Vec_int_4_channels + fmt = _AHT._DataType_Vec_int_4_fmt + + def __init__(self): + _AHT._DataType_Vec_int_4_swiginit(self, _AHT.new__DataType_Vec_int_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _AHT: +_AHT._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_6_1_rows + cols = _AHT._Matx_int_6_1_cols + channels = _AHT._Matx_int_6_1_channels + shortdim = _AHT._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_6_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_6_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_6_1___call__(self, i, j) + val = property(_AHT._Matx_int_6_1_val_get, _AHT._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_6_1_swiginit(self, _AHT.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_6_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _AHT: +_AHT._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _AHT._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _AHT._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _AHT._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _AHT._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _AHT._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _AHT._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_6_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_6_swiginit(self, _AHT.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_6___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_6 + +# Register _Vec_int_6 in _AHT: +_AHT._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _AHT._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_6_generic_type + channels = _AHT._DataType_Vec_int_6_channels + fmt = _AHT._DataType_Vec_int_6_fmt + + def __init__(self): + _AHT._DataType_Vec_int_6_swiginit(self, _AHT.new__DataType_Vec_int_6()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _AHT: +_AHT._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_8_1_rows + cols = _AHT._Matx_int_8_1_cols + channels = _AHT._Matx_int_8_1_channels + shortdim = _AHT._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_8_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_8_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_8_1___call__(self, i, j) + val = property(_AHT._Matx_int_8_1_val_get, _AHT._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_8_1_swiginit(self, _AHT.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_8_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _AHT: +_AHT._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _AHT._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _AHT._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _AHT._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _AHT._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _AHT._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _AHT._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_8_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_8_swiginit(self, _AHT.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_8___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_8 + +# Register _Vec_int_8 in _AHT: +_AHT._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _AHT._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_8_generic_type + channels = _AHT._DataType_Vec_int_8_channels + fmt = _AHT._DataType_Vec_int_8_fmt + + def __init__(self): + _AHT._DataType_Vec_int_8_swiginit(self, _AHT.new__DataType_Vec_int_8()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _AHT: +_AHT._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_float_value + + def __init__(self): + _AHT._cv_numpy_sizeof_float_swiginit(self, _AHT.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _AHT: +_AHT._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.floatArray___nonzero__(self) + + def __bool__(self): + return _AHT.floatArray___bool__(self) + + def __len__(self): + return _AHT.floatArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.floatArray___setitem__(self, *args) + + def pop(self): + return _AHT.floatArray_pop(self) + + def append(self, x): + return _AHT.floatArray_append(self, x) + + def empty(self): + return _AHT.floatArray_empty(self) + + def size(self): + return _AHT.floatArray_size(self) + + def swap(self, v): + return _AHT.floatArray_swap(self, v) + + def begin(self): + return _AHT.floatArray_begin(self) + + def end(self): + return _AHT.floatArray_end(self) + + def rbegin(self): + return _AHT.floatArray_rbegin(self) + + def rend(self): + return _AHT.floatArray_rend(self) + + def clear(self): + return _AHT.floatArray_clear(self) + + def get_allocator(self): + return _AHT.floatArray_get_allocator(self) + + def pop_back(self): + return _AHT.floatArray_pop_back(self) + + def erase(self, *args): + return _AHT.floatArray_erase(self, *args) + + def __init__(self, *args): + _AHT.floatArray_swiginit(self, _AHT.new_floatArray(*args)) + + def push_back(self, x): + return _AHT.floatArray_push_back(self, x) + + def front(self): + return _AHT.floatArray_front(self) + + def back(self): + return _AHT.floatArray_back(self) + + def assign(self, n, x): + return _AHT.floatArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.floatArray_resize(self, *args) + + def insert(self, *args): + return _AHT.floatArray_insert(self, *args) + + def reserve(self, n): + return _AHT.floatArray_reserve(self, n) + + def capacity(self): + return _AHT.floatArray_capacity(self) + __swig_destroy__ = _AHT.delete_floatArray + +# Register floatArray in _AHT: +_AHT.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_2_1_rows + cols = _AHT._Matx_float_2_1_cols + channels = _AHT._Matx_float_2_1_channels + shortdim = _AHT._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_float_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_2_1___call__(self, i, j) + val = property(_AHT._Matx_float_2_1_val_get, _AHT._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_2_1_swiginit(self, _AHT.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _AHT: +_AHT._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _AHT._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _AHT._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _AHT._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _AHT._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _AHT._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _AHT._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_float_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_float_2_swiginit(self, _AHT.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_float_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_float_2 + +# Register _Vec_float_2 in _AHT: +_AHT._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _AHT._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_float_2_generic_type + channels = _AHT._DataType_Vec_float_2_channels + fmt = _AHT._DataType_Vec_float_2_fmt + + def __init__(self): + _AHT._DataType_Vec_float_2_swiginit(self, _AHT.new__DataType_Vec_float_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _AHT: +_AHT._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_3_1_rows + cols = _AHT._Matx_float_3_1_cols + channels = _AHT._Matx_float_3_1_channels + shortdim = _AHT._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_float_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_3_1___call__(self, i, j) + val = property(_AHT._Matx_float_3_1_val_get, _AHT._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_3_1_swiginit(self, _AHT.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _AHT: +_AHT._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _AHT._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _AHT._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _AHT._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _AHT._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _AHT._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _AHT._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_float_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_float_3_swiginit(self, _AHT.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_float_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_float_3 + +# Register _Vec_float_3 in _AHT: +_AHT._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _AHT._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_float_3_generic_type + channels = _AHT._DataType_Vec_float_3_channels + fmt = _AHT._DataType_Vec_float_3_fmt + + def __init__(self): + _AHT._DataType_Vec_float_3_swiginit(self, _AHT.new__DataType_Vec_float_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _AHT: +_AHT._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_4_1_rows + cols = _AHT._Matx_float_4_1_cols + channels = _AHT._Matx_float_4_1_channels + shortdim = _AHT._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_float_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_4_1___call__(self, i, j) + val = property(_AHT._Matx_float_4_1_val_get, _AHT._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_4_1_swiginit(self, _AHT.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _AHT: +_AHT._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _AHT._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _AHT._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _AHT._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _AHT._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _AHT._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _AHT._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_float_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_float_4_swiginit(self, _AHT.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_float_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_float_4 + +# Register _Vec_float_4 in _AHT: +_AHT._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _AHT._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_float_4_generic_type + channels = _AHT._DataType_Vec_float_4_channels + fmt = _AHT._DataType_Vec_float_4_fmt + + def __init__(self): + _AHT._DataType_Vec_float_4_swiginit(self, _AHT.new__DataType_Vec_float_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _AHT: +_AHT._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_6_1_rows + cols = _AHT._Matx_float_6_1_cols + channels = _AHT._Matx_float_6_1_channels + shortdim = _AHT._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_6_1_ddot(self, v) + + def t(self): + return _AHT._Matx_float_6_1_t(self) + + def mul(self, a): + return _AHT._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_6_1___call__(self, i, j) + val = property(_AHT._Matx_float_6_1_val_get, _AHT._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_6_1_swiginit(self, _AHT.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_6_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _AHT: +_AHT._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _AHT._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _AHT._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _AHT._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _AHT._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _AHT._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _AHT._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_float_6_all(alpha) + + def mul(self, v): + return _AHT._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_float_6_swiginit(self, _AHT.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_float_6___str__(self) + __swig_destroy__ = _AHT.delete__Vec_float_6 + +# Register _Vec_float_6 in _AHT: +_AHT._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _AHT._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_float_6_generic_type + channels = _AHT._DataType_Vec_float_6_channels + fmt = _AHT._DataType_Vec_float_6_fmt + + def __init__(self): + _AHT._DataType_Vec_float_6_swiginit(self, _AHT.new__DataType_Vec_float_6()) + __swig_destroy__ = _AHT.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _AHT: +_AHT._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_double_value + + def __init__(self): + _AHT._cv_numpy_sizeof_double_swiginit(self, _AHT.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _AHT: +_AHT._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.doubleArray___nonzero__(self) + + def __bool__(self): + return _AHT.doubleArray___bool__(self) + + def __len__(self): + return _AHT.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.doubleArray___setitem__(self, *args) + + def pop(self): + return _AHT.doubleArray_pop(self) + + def append(self, x): + return _AHT.doubleArray_append(self, x) + + def empty(self): + return _AHT.doubleArray_empty(self) + + def size(self): + return _AHT.doubleArray_size(self) + + def swap(self, v): + return _AHT.doubleArray_swap(self, v) + + def begin(self): + return _AHT.doubleArray_begin(self) + + def end(self): + return _AHT.doubleArray_end(self) + + def rbegin(self): + return _AHT.doubleArray_rbegin(self) + + def rend(self): + return _AHT.doubleArray_rend(self) + + def clear(self): + return _AHT.doubleArray_clear(self) + + def get_allocator(self): + return _AHT.doubleArray_get_allocator(self) + + def pop_back(self): + return _AHT.doubleArray_pop_back(self) + + def erase(self, *args): + return _AHT.doubleArray_erase(self, *args) + + def __init__(self, *args): + _AHT.doubleArray_swiginit(self, _AHT.new_doubleArray(*args)) + + def push_back(self, x): + return _AHT.doubleArray_push_back(self, x) + + def front(self): + return _AHT.doubleArray_front(self) + + def back(self): + return _AHT.doubleArray_back(self) + + def assign(self, n, x): + return _AHT.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.doubleArray_resize(self, *args) + + def insert(self, *args): + return _AHT.doubleArray_insert(self, *args) + + def reserve(self, n): + return _AHT.doubleArray_reserve(self, n) + + def capacity(self): + return _AHT.doubleArray_capacity(self) + __swig_destroy__ = _AHT.delete_doubleArray + +# Register doubleArray in _AHT: +_AHT.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_2_1_rows + cols = _AHT._Matx_double_2_1_cols + channels = _AHT._Matx_double_2_1_channels + shortdim = _AHT._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_double_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_2_1___call__(self, i, j) + val = property(_AHT._Matx_double_2_1_val_get, _AHT._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_2_1_swiginit(self, _AHT.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _AHT: +_AHT._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _AHT._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _AHT._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _AHT._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _AHT._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _AHT._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _AHT._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_double_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_double_2_swiginit(self, _AHT.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_double_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_double_2 + +# Register _Vec_double_2 in _AHT: +_AHT._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _AHT._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_double_2_generic_type + channels = _AHT._DataType_Vec_double_2_channels + fmt = _AHT._DataType_Vec_double_2_fmt + + def __init__(self): + _AHT._DataType_Vec_double_2_swiginit(self, _AHT.new__DataType_Vec_double_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _AHT: +_AHT._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_3_1_rows + cols = _AHT._Matx_double_3_1_cols + channels = _AHT._Matx_double_3_1_channels + shortdim = _AHT._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_double_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_3_1___call__(self, i, j) + val = property(_AHT._Matx_double_3_1_val_get, _AHT._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_3_1_swiginit(self, _AHT.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _AHT: +_AHT._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _AHT._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _AHT._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _AHT._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _AHT._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _AHT._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _AHT._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_double_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_double_3_swiginit(self, _AHT.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_double_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_double_3 + +# Register _Vec_double_3 in _AHT: +_AHT._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _AHT._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_double_3_generic_type + channels = _AHT._DataType_Vec_double_3_channels + fmt = _AHT._DataType_Vec_double_3_fmt + + def __init__(self): + _AHT._DataType_Vec_double_3_swiginit(self, _AHT.new__DataType_Vec_double_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _AHT: +_AHT._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_4_1_rows + cols = _AHT._Matx_double_4_1_cols + channels = _AHT._Matx_double_4_1_channels + shortdim = _AHT._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_double_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_4_1___call__(self, i, j) + val = property(_AHT._Matx_double_4_1_val_get, _AHT._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_4_1_swiginit(self, _AHT.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _AHT: +_AHT._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _AHT._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _AHT._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _AHT._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _AHT._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _AHT._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _AHT._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_double_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_double_4_swiginit(self, _AHT.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_double_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_double_4 + +# Register _Vec_double_4 in _AHT: +_AHT._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _AHT._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_double_4_generic_type + channels = _AHT._DataType_Vec_double_4_channels + fmt = _AHT._DataType_Vec_double_4_fmt + + def __init__(self): + _AHT._DataType_Vec_double_4_swiginit(self, _AHT.new__DataType_Vec_double_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _AHT: +_AHT._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_6_1_rows + cols = _AHT._Matx_double_6_1_cols + channels = _AHT._Matx_double_6_1_channels + shortdim = _AHT._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_6_1_ddot(self, v) + + def t(self): + return _AHT._Matx_double_6_1_t(self) + + def mul(self, a): + return _AHT._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_6_1___call__(self, i, j) + val = property(_AHT._Matx_double_6_1_val_get, _AHT._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_6_1_swiginit(self, _AHT.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_6_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _AHT: +_AHT._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _AHT._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _AHT._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _AHT._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _AHT._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _AHT._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _AHT._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_double_6_all(alpha) + + def mul(self, v): + return _AHT._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_double_6_swiginit(self, _AHT.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_double_6___str__(self) + __swig_destroy__ = _AHT.delete__Vec_double_6 + +# Register _Vec_double_6 in _AHT: +_AHT._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _AHT._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_double_6_generic_type + channels = _AHT._DataType_Vec_double_6_channels + fmt = _AHT._DataType_Vec_double_6_fmt + + def __init__(self): + _AHT._DataType_Vec_double_6_swiginit(self, _AHT.new__DataType_Vec_double_6()) + __swig_destroy__ = _AHT.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _AHT: +_AHT._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT._mat__np_array_constructor_swiginit(self, _AHT.new__mat__np_array_constructor()) + __swig_destroy__ = _AHT.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _AHT: +_AHT._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _AHT._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _AHT._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_uchar_value + + def __init__(self): + _AHT._cv_numpy_sizeof_uchar_swiginit(self, _AHT.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _AHT: +_AHT._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__uchar_create(self, *args) + + def cross(self, m): + return _AHT._Mat__uchar_cross(self, m) + + def row(self, y): + return _AHT._Mat__uchar_row(self, y) + + def col(self, x): + return _AHT._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__uchar_diag(self, d) + + def clone(self): + return _AHT._Mat__uchar_clone(self) + + def elemSize(self): + return _AHT._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__uchar_elemSize1(self) + + def type(self): + return _AHT._Mat__uchar_type(self) + + def depth(self): + return _AHT._Mat__uchar_depth(self) + + def channels(self): + return _AHT._Mat__uchar_channels(self) + + def step1(self, i=0): + return _AHT._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__uchar_swiginit(self, _AHT.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__uchar___str__(self) + __swig_destroy__ = _AHT.delete__Mat__uchar + +# Register _Mat__uchar in _AHT: +_AHT._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2b_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _AHT: +_AHT._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2b_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2b_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2b_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2b_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2b_type(self) + + def depth(self): + return _AHT._Mat__Vec2b_depth(self) + + def channels(self): + return _AHT._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2b_swiginit(self, _AHT.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2b___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _AHT: +_AHT._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3b_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _AHT: +_AHT._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3b_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3b_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3b_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3b_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3b_type(self) + + def depth(self): + return _AHT._Mat__Vec3b_depth(self) + + def channels(self): + return _AHT._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3b_swiginit(self, _AHT.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3b___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _AHT: +_AHT._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4b_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _AHT: +_AHT._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4b_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4b_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4b_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4b_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4b_type(self) + + def depth(self): + return _AHT._Mat__Vec4b_depth(self) + + def channels(self): + return _AHT._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4b_swiginit(self, _AHT.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4b___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _AHT: +_AHT._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__short_create(self, *args) + + def cross(self, m): + return _AHT._Mat__short_cross(self, m) + + def row(self, y): + return _AHT._Mat__short_row(self, y) + + def col(self, x): + return _AHT._Mat__short_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__short_diag(self, d) + + def clone(self): + return _AHT._Mat__short_clone(self) + + def elemSize(self): + return _AHT._Mat__short_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__short_elemSize1(self) + + def type(self): + return _AHT._Mat__short_type(self) + + def depth(self): + return _AHT._Mat__short_depth(self) + + def channels(self): + return _AHT._Mat__short_channels(self) + + def step1(self, i=0): + return _AHT._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__short___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__short_swiginit(self, _AHT.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__short___str__(self) + __swig_destroy__ = _AHT.delete__Mat__short + +# Register _Mat__short in _AHT: +_AHT._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2s_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _AHT: +_AHT._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2s_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2s_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2s_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2s_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2s_type(self) + + def depth(self): + return _AHT._Mat__Vec2s_depth(self) + + def channels(self): + return _AHT._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2s_swiginit(self, _AHT.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2s___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _AHT: +_AHT._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3s_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _AHT: +_AHT._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3s_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3s_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3s_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3s_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3s_type(self) + + def depth(self): + return _AHT._Mat__Vec3s_depth(self) + + def channels(self): + return _AHT._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3s_swiginit(self, _AHT.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3s___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _AHT: +_AHT._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4s_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _AHT: +_AHT._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4s_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4s_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4s_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4s_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4s_type(self) + + def depth(self): + return _AHT._Mat__Vec4s_depth(self) + + def channels(self): + return _AHT._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4s_swiginit(self, _AHT.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4s___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _AHT: +_AHT._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__ushort_create(self, *args) + + def cross(self, m): + return _AHT._Mat__ushort_cross(self, m) + + def row(self, y): + return _AHT._Mat__ushort_row(self, y) + + def col(self, x): + return _AHT._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__ushort_diag(self, d) + + def clone(self): + return _AHT._Mat__ushort_clone(self) + + def elemSize(self): + return _AHT._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__ushort_elemSize1(self) + + def type(self): + return _AHT._Mat__ushort_type(self) + + def depth(self): + return _AHT._Mat__ushort_depth(self) + + def channels(self): + return _AHT._Mat__ushort_channels(self) + + def step1(self, i=0): + return _AHT._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__ushort_swiginit(self, _AHT.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__ushort___str__(self) + __swig_destroy__ = _AHT.delete__Mat__ushort + +# Register _Mat__ushort in _AHT: +_AHT._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2w_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _AHT: +_AHT._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2w_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2w_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2w_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2w_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2w_type(self) + + def depth(self): + return _AHT._Mat__Vec2w_depth(self) + + def channels(self): + return _AHT._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2w_swiginit(self, _AHT.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2w___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _AHT: +_AHT._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3w_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _AHT: +_AHT._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3w_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3w_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3w_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3w_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3w_type(self) + + def depth(self): + return _AHT._Mat__Vec3w_depth(self) + + def channels(self): + return _AHT._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3w_swiginit(self, _AHT.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3w___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _AHT: +_AHT._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4w_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _AHT: +_AHT._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4w_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4w_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4w_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4w_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4w_type(self) + + def depth(self): + return _AHT._Mat__Vec4w_depth(self) + + def channels(self): + return _AHT._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4w_swiginit(self, _AHT.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4w___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _AHT: +_AHT._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__int_create(self, *args) + + def cross(self, m): + return _AHT._Mat__int_cross(self, m) + + def row(self, y): + return _AHT._Mat__int_row(self, y) + + def col(self, x): + return _AHT._Mat__int_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__int_diag(self, d) + + def clone(self): + return _AHT._Mat__int_clone(self) + + def elemSize(self): + return _AHT._Mat__int_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__int_elemSize1(self) + + def type(self): + return _AHT._Mat__int_type(self) + + def depth(self): + return _AHT._Mat__int_depth(self) + + def channels(self): + return _AHT._Mat__int_channels(self) + + def step1(self, i=0): + return _AHT._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__int___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__int_swiginit(self, _AHT.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__int___str__(self) + __swig_destroy__ = _AHT.delete__Mat__int + +# Register _Mat__int in _AHT: +_AHT._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2i_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _AHT: +_AHT._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2i_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2i_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2i_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2i_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2i_type(self) + + def depth(self): + return _AHT._Mat__Vec2i_depth(self) + + def channels(self): + return _AHT._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2i_swiginit(self, _AHT.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2i___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _AHT: +_AHT._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3i_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _AHT: +_AHT._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3i_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3i_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3i_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3i_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3i_type(self) + + def depth(self): + return _AHT._Mat__Vec3i_depth(self) + + def channels(self): + return _AHT._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3i_swiginit(self, _AHT.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3i___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _AHT: +_AHT._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4i_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _AHT: +_AHT._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4i_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4i_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4i_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4i_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4i_type(self) + + def depth(self): + return _AHT._Mat__Vec4i_depth(self) + + def channels(self): + return _AHT._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4i_swiginit(self, _AHT.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4i___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _AHT: +_AHT._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__float_create(self, *args) + + def cross(self, m): + return _AHT._Mat__float_cross(self, m) + + def row(self, y): + return _AHT._Mat__float_row(self, y) + + def col(self, x): + return _AHT._Mat__float_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__float_diag(self, d) + + def clone(self): + return _AHT._Mat__float_clone(self) + + def elemSize(self): + return _AHT._Mat__float_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__float_elemSize1(self) + + def type(self): + return _AHT._Mat__float_type(self) + + def depth(self): + return _AHT._Mat__float_depth(self) + + def channels(self): + return _AHT._Mat__float_channels(self) + + def step1(self, i=0): + return _AHT._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__float___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__float_swiginit(self, _AHT.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__float___str__(self) + __swig_destroy__ = _AHT.delete__Mat__float + +# Register _Mat__float in _AHT: +_AHT._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2f_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _AHT: +_AHT._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2f_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2f_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2f_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2f_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2f_type(self) + + def depth(self): + return _AHT._Mat__Vec2f_depth(self) + + def channels(self): + return _AHT._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2f_swiginit(self, _AHT.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2f___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _AHT: +_AHT._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3f_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _AHT: +_AHT._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3f_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3f_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3f_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3f_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3f_type(self) + + def depth(self): + return _AHT._Mat__Vec3f_depth(self) + + def channels(self): + return _AHT._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3f_swiginit(self, _AHT.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3f___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _AHT: +_AHT._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4f_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _AHT: +_AHT._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4f_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4f_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4f_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4f_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4f_type(self) + + def depth(self): + return _AHT._Mat__Vec4f_depth(self) + + def channels(self): + return _AHT._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4f_swiginit(self, _AHT.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4f___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _AHT: +_AHT._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__double_create(self, *args) + + def cross(self, m): + return _AHT._Mat__double_cross(self, m) + + def row(self, y): + return _AHT._Mat__double_row(self, y) + + def col(self, x): + return _AHT._Mat__double_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__double_diag(self, d) + + def clone(self): + return _AHT._Mat__double_clone(self) + + def elemSize(self): + return _AHT._Mat__double_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__double_elemSize1(self) + + def type(self): + return _AHT._Mat__double_type(self) + + def depth(self): + return _AHT._Mat__double_depth(self) + + def channels(self): + return _AHT._Mat__double_channels(self) + + def step1(self, i=0): + return _AHT._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__double___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__double_swiginit(self, _AHT.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__double___str__(self) + __swig_destroy__ = _AHT.delete__Mat__double + +# Register _Mat__double in _AHT: +_AHT._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2d_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _AHT: +_AHT._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2d_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2d_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2d_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2d_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2d_type(self) + + def depth(self): + return _AHT._Mat__Vec2d_depth(self) + + def channels(self): + return _AHT._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2d_swiginit(self, _AHT.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2d___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _AHT: +_AHT._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3d_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _AHT: +_AHT._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3d_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3d_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3d_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3d_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3d_type(self) + + def depth(self): + return _AHT._Mat__Vec3d_depth(self) + + def channels(self): + return _AHT._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3d_swiginit(self, _AHT.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3d___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _AHT: +_AHT._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4d_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _AHT: +_AHT._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4d_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4d_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4d_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4d_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4d_type(self) + + def depth(self): + return _AHT._Mat__Vec4d_depth(self) + + def channels(self): + return _AHT._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4d_swiginit(self, _AHT.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4d___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _AHT: +_AHT._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_1_2_rows + cols = _AHT._Matx_float_1_2_cols + channels = _AHT._Matx_float_1_2_channels + shortdim = _AHT._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_1_2_ddot(self, v) + + def t(self): + return _AHT._Matx_float_1_2_t(self) + + def mul(self, a): + return _AHT._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_1_2___call__(self, i, j) + val = property(_AHT._Matx_float_1_2_val_get, _AHT._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_1_2_swiginit(self, _AHT.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_1_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _AHT: +_AHT._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _AHT._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _AHT._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _AHT._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _AHT._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _AHT._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _AHT._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_1_2_rows + cols = _AHT._Matx_double_1_2_cols + channels = _AHT._Matx_double_1_2_channels + shortdim = _AHT._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_1_2_ddot(self, v) + + def t(self): + return _AHT._Matx_double_1_2_t(self) + + def mul(self, a): + return _AHT._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_1_2___call__(self, i, j) + val = property(_AHT._Matx_double_1_2_val_get, _AHT._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_1_2_swiginit(self, _AHT.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_1_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _AHT: +_AHT._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _AHT._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _AHT._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _AHT._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _AHT._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _AHT._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _AHT._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_1_3_rows + cols = _AHT._Matx_float_1_3_cols + channels = _AHT._Matx_float_1_3_channels + shortdim = _AHT._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_1_3_ddot(self, v) + + def t(self): + return _AHT._Matx_float_1_3_t(self) + + def mul(self, a): + return _AHT._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_1_3___call__(self, i, j) + val = property(_AHT._Matx_float_1_3_val_get, _AHT._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_1_3_swiginit(self, _AHT.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_1_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _AHT: +_AHT._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _AHT._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _AHT._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _AHT._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _AHT._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _AHT._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _AHT._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_1_3_rows + cols = _AHT._Matx_double_1_3_cols + channels = _AHT._Matx_double_1_3_channels + shortdim = _AHT._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_1_3_ddot(self, v) + + def t(self): + return _AHT._Matx_double_1_3_t(self) + + def mul(self, a): + return _AHT._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_1_3___call__(self, i, j) + val = property(_AHT._Matx_double_1_3_val_get, _AHT._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_1_3_swiginit(self, _AHT.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_1_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _AHT: +_AHT._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _AHT._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _AHT._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _AHT._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _AHT._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _AHT._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _AHT._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_1_4_rows + cols = _AHT._Matx_float_1_4_cols + channels = _AHT._Matx_float_1_4_channels + shortdim = _AHT._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_1_4_ddot(self, v) + + def t(self): + return _AHT._Matx_float_1_4_t(self) + + def mul(self, a): + return _AHT._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_1_4___call__(self, i, j) + val = property(_AHT._Matx_float_1_4_val_get, _AHT._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_1_4_swiginit(self, _AHT.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_1_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _AHT: +_AHT._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _AHT._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _AHT._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _AHT._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _AHT._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _AHT._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _AHT._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_1_4_rows + cols = _AHT._Matx_double_1_4_cols + channels = _AHT._Matx_double_1_4_channels + shortdim = _AHT._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_1_4_ddot(self, v) + + def t(self): + return _AHT._Matx_double_1_4_t(self) + + def mul(self, a): + return _AHT._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_1_4___call__(self, i, j) + val = property(_AHT._Matx_double_1_4_val_get, _AHT._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_1_4_swiginit(self, _AHT.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_1_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _AHT: +_AHT._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _AHT._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _AHT._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _AHT._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _AHT._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _AHT._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _AHT._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_1_6_rows + cols = _AHT._Matx_float_1_6_cols + channels = _AHT._Matx_float_1_6_channels + shortdim = _AHT._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_1_6_ddot(self, v) + + def t(self): + return _AHT._Matx_float_1_6_t(self) + + def mul(self, a): + return _AHT._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_1_6___call__(self, i, j) + val = property(_AHT._Matx_float_1_6_val_get, _AHT._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_1_6_swiginit(self, _AHT.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_1_6___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _AHT: +_AHT._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _AHT._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _AHT._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _AHT._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _AHT._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _AHT._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _AHT._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_1_6_rows + cols = _AHT._Matx_double_1_6_cols + channels = _AHT._Matx_double_1_6_channels + shortdim = _AHT._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_1_6_ddot(self, v) + + def t(self): + return _AHT._Matx_double_1_6_t(self) + + def mul(self, a): + return _AHT._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_1_6___call__(self, i, j) + val = property(_AHT._Matx_double_1_6_val_get, _AHT._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_1_6_swiginit(self, _AHT.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_1_6___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _AHT: +_AHT._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _AHT._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _AHT._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _AHT._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _AHT._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _AHT._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _AHT._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_2_2_rows + cols = _AHT._Matx_float_2_2_cols + channels = _AHT._Matx_float_2_2_channels + shortdim = _AHT._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_2_2_ddot(self, v) + + def t(self): + return _AHT._Matx_float_2_2_t(self) + + def mul(self, a): + return _AHT._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_2_2___call__(self, i, j) + val = property(_AHT._Matx_float_2_2_val_get, _AHT._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_2_2_swiginit(self, _AHT.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_2_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _AHT: +_AHT._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _AHT._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _AHT._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _AHT._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _AHT._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _AHT._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _AHT._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_2_2_rows + cols = _AHT._Matx_double_2_2_cols + channels = _AHT._Matx_double_2_2_channels + shortdim = _AHT._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_2_2_ddot(self, v) + + def t(self): + return _AHT._Matx_double_2_2_t(self) + + def mul(self, a): + return _AHT._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_2_2___call__(self, i, j) + val = property(_AHT._Matx_double_2_2_val_get, _AHT._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_2_2_swiginit(self, _AHT.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_2_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _AHT: +_AHT._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _AHT._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _AHT._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _AHT._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _AHT._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _AHT._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _AHT._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_2_3_rows + cols = _AHT._Matx_float_2_3_cols + channels = _AHT._Matx_float_2_3_channels + shortdim = _AHT._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_2_3_ddot(self, v) + + def t(self): + return _AHT._Matx_float_2_3_t(self) + + def mul(self, a): + return _AHT._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_2_3___call__(self, i, j) + val = property(_AHT._Matx_float_2_3_val_get, _AHT._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_2_3_swiginit(self, _AHT.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_2_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _AHT: +_AHT._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _AHT._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _AHT._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _AHT._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _AHT._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _AHT._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _AHT._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_2_3_rows + cols = _AHT._Matx_double_2_3_cols + channels = _AHT._Matx_double_2_3_channels + shortdim = _AHT._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_2_3_ddot(self, v) + + def t(self): + return _AHT._Matx_double_2_3_t(self) + + def mul(self, a): + return _AHT._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_2_3___call__(self, i, j) + val = property(_AHT._Matx_double_2_3_val_get, _AHT._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_2_3_swiginit(self, _AHT.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_2_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _AHT: +_AHT._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _AHT._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _AHT._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _AHT._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _AHT._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _AHT._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _AHT._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_3_2_rows + cols = _AHT._Matx_float_3_2_cols + channels = _AHT._Matx_float_3_2_channels + shortdim = _AHT._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_3_2_ddot(self, v) + + def t(self): + return _AHT._Matx_float_3_2_t(self) + + def mul(self, a): + return _AHT._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_3_2___call__(self, i, j) + val = property(_AHT._Matx_float_3_2_val_get, _AHT._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_3_2_swiginit(self, _AHT.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_3_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _AHT: +_AHT._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _AHT._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _AHT._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _AHT._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _AHT._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _AHT._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _AHT._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_3_2_rows + cols = _AHT._Matx_double_3_2_cols + channels = _AHT._Matx_double_3_2_channels + shortdim = _AHT._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_3_2_ddot(self, v) + + def t(self): + return _AHT._Matx_double_3_2_t(self) + + def mul(self, a): + return _AHT._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_3_2___call__(self, i, j) + val = property(_AHT._Matx_double_3_2_val_get, _AHT._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_3_2_swiginit(self, _AHT.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_3_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _AHT: +_AHT._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _AHT._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _AHT._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _AHT._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _AHT._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _AHT._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _AHT._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_3_3_rows + cols = _AHT._Matx_float_3_3_cols + channels = _AHT._Matx_float_3_3_channels + shortdim = _AHT._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_3_3_ddot(self, v) + + def t(self): + return _AHT._Matx_float_3_3_t(self) + + def mul(self, a): + return _AHT._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_3_3___call__(self, i, j) + val = property(_AHT._Matx_float_3_3_val_get, _AHT._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_3_3_swiginit(self, _AHT.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_3_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _AHT: +_AHT._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _AHT._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _AHT._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _AHT._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _AHT._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _AHT._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _AHT._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_3_3_rows + cols = _AHT._Matx_double_3_3_cols + channels = _AHT._Matx_double_3_3_channels + shortdim = _AHT._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_3_3_ddot(self, v) + + def t(self): + return _AHT._Matx_double_3_3_t(self) + + def mul(self, a): + return _AHT._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_3_3___call__(self, i, j) + val = property(_AHT._Matx_double_3_3_val_get, _AHT._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_3_3_swiginit(self, _AHT.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_3_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _AHT: +_AHT._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _AHT._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _AHT._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _AHT._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _AHT._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _AHT._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _AHT._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_3_4_rows + cols = _AHT._Matx_float_3_4_cols + channels = _AHT._Matx_float_3_4_channels + shortdim = _AHT._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_3_4_ddot(self, v) + + def t(self): + return _AHT._Matx_float_3_4_t(self) + + def mul(self, a): + return _AHT._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_3_4___call__(self, i, j) + val = property(_AHT._Matx_float_3_4_val_get, _AHT._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_3_4_swiginit(self, _AHT.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_3_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _AHT: +_AHT._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _AHT._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _AHT._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _AHT._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _AHT._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _AHT._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _AHT._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_3_4_rows + cols = _AHT._Matx_double_3_4_cols + channels = _AHT._Matx_double_3_4_channels + shortdim = _AHT._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_3_4_ddot(self, v) + + def t(self): + return _AHT._Matx_double_3_4_t(self) + + def mul(self, a): + return _AHT._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_3_4___call__(self, i, j) + val = property(_AHT._Matx_double_3_4_val_get, _AHT._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_3_4_swiginit(self, _AHT.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_3_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _AHT: +_AHT._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _AHT._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _AHT._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _AHT._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _AHT._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _AHT._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _AHT._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_4_3_rows + cols = _AHT._Matx_float_4_3_cols + channels = _AHT._Matx_float_4_3_channels + shortdim = _AHT._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_4_3_ddot(self, v) + + def t(self): + return _AHT._Matx_float_4_3_t(self) + + def mul(self, a): + return _AHT._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_4_3___call__(self, i, j) + val = property(_AHT._Matx_float_4_3_val_get, _AHT._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_4_3_swiginit(self, _AHT.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_4_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _AHT: +_AHT._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _AHT._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _AHT._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _AHT._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _AHT._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _AHT._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _AHT._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_4_3_rows + cols = _AHT._Matx_double_4_3_cols + channels = _AHT._Matx_double_4_3_channels + shortdim = _AHT._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_4_3_ddot(self, v) + + def t(self): + return _AHT._Matx_double_4_3_t(self) + + def mul(self, a): + return _AHT._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_4_3___call__(self, i, j) + val = property(_AHT._Matx_double_4_3_val_get, _AHT._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_4_3_swiginit(self, _AHT.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_4_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _AHT: +_AHT._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _AHT._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _AHT._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _AHT._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _AHT._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _AHT._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _AHT._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_4_4_rows + cols = _AHT._Matx_float_4_4_cols + channels = _AHT._Matx_float_4_4_channels + shortdim = _AHT._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_4_4_ddot(self, v) + + def t(self): + return _AHT._Matx_float_4_4_t(self) + + def mul(self, a): + return _AHT._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_4_4___call__(self, i, j) + val = property(_AHT._Matx_float_4_4_val_get, _AHT._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_4_4_swiginit(self, _AHT.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_4_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _AHT: +_AHT._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _AHT._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _AHT._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _AHT._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _AHT._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _AHT._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _AHT._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_4_4_rows + cols = _AHT._Matx_double_4_4_cols + channels = _AHT._Matx_double_4_4_channels + shortdim = _AHT._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_4_4_ddot(self, v) + + def t(self): + return _AHT._Matx_double_4_4_t(self) + + def mul(self, a): + return _AHT._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_4_4___call__(self, i, j) + val = property(_AHT._Matx_double_4_4_val_get, _AHT._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_4_4_swiginit(self, _AHT.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_4_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _AHT: +_AHT._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _AHT._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _AHT._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _AHT._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _AHT._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _AHT._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _AHT._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_6_6_rows + cols = _AHT._Matx_float_6_6_cols + channels = _AHT._Matx_float_6_6_channels + shortdim = _AHT._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_6_6_ddot(self, v) + + def t(self): + return _AHT._Matx_float_6_6_t(self) + + def mul(self, a): + return _AHT._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_6_6___call__(self, i, j) + val = property(_AHT._Matx_float_6_6_val_get, _AHT._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_6_6_swiginit(self, _AHT.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_6_6___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _AHT: +_AHT._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _AHT._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _AHT._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _AHT._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _AHT._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _AHT._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _AHT._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_6_6_rows + cols = _AHT._Matx_double_6_6_cols + channels = _AHT._Matx_double_6_6_channels + shortdim = _AHT._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_6_6_ddot(self, v) + + def t(self): + return _AHT._Matx_double_6_6_t(self) + + def mul(self, a): + return _AHT._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_6_6___call__(self, i, j) + val = property(_AHT._Matx_double_6_6_val_get, _AHT._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_6_6_swiginit(self, _AHT.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_6_6___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _AHT: +_AHT._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _AHT._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _AHT._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _AHT._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _AHT._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _AHT._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _AHT._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Point__int_swiginit(self, _AHT.new__Point__int(*args)) + + def dot(self, pt): + return _AHT._Point__int_dot(self, pt) + + def ddot(self, pt): + return _AHT._Point__int_ddot(self, pt) + + def cross(self, pt): + return _AHT._Point__int_cross(self, pt) + x = property(_AHT._Point__int_x_get, _AHT._Point__int_x_set) + y = property(_AHT._Point__int_y_get, _AHT._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _AHT._Point__int___str__(self) + __swig_destroy__ = _AHT.delete__Point__int + +# Register _Point__int in _AHT: +_AHT._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Point__float_swiginit(self, _AHT.new__Point__float(*args)) + + def dot(self, pt): + return _AHT._Point__float_dot(self, pt) + + def ddot(self, pt): + return _AHT._Point__float_ddot(self, pt) + + def cross(self, pt): + return _AHT._Point__float_cross(self, pt) + x = property(_AHT._Point__float_x_get, _AHT._Point__float_x_set) + y = property(_AHT._Point__float_y_get, _AHT._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _AHT._Point__float___str__(self) + __swig_destroy__ = _AHT.delete__Point__float + +# Register _Point__float in _AHT: +_AHT._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Point__double_swiginit(self, _AHT.new__Point__double(*args)) + + def dot(self, pt): + return _AHT._Point__double_dot(self, pt) + + def ddot(self, pt): + return _AHT._Point__double_ddot(self, pt) + + def cross(self, pt): + return _AHT._Point__double_cross(self, pt) + x = property(_AHT._Point__double_x_get, _AHT._Point__double_x_set) + y = property(_AHT._Point__double_y_get, _AHT._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _AHT._Point__double___str__(self) + __swig_destroy__ = _AHT.delete__Point__double + +# Register _Point__double in _AHT: +_AHT._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Rect__int_swiginit(self, _AHT.new__Rect__int(*args)) + + def tl(self): + return _AHT._Rect__int_tl(self) + + def br(self): + return _AHT._Rect__int_br(self) + + def size(self): + return _AHT._Rect__int_size(self) + + def area(self): + return _AHT._Rect__int_area(self) + + def contains(self, pt): + return _AHT._Rect__int_contains(self, pt) + x = property(_AHT._Rect__int_x_get, _AHT._Rect__int_x_set) + y = property(_AHT._Rect__int_y_get, _AHT._Rect__int_y_set) + width = property(_AHT._Rect__int_width_get, _AHT._Rect__int_width_set) + height = property(_AHT._Rect__int_height_get, _AHT._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _AHT._Rect__int___str__(self) + __swig_destroy__ = _AHT.delete__Rect__int + +# Register _Rect__int in _AHT: +_AHT._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Rect__float_swiginit(self, _AHT.new__Rect__float(*args)) + + def tl(self): + return _AHT._Rect__float_tl(self) + + def br(self): + return _AHT._Rect__float_br(self) + + def size(self): + return _AHT._Rect__float_size(self) + + def area(self): + return _AHT._Rect__float_area(self) + + def contains(self, pt): + return _AHT._Rect__float_contains(self, pt) + x = property(_AHT._Rect__float_x_get, _AHT._Rect__float_x_set) + y = property(_AHT._Rect__float_y_get, _AHT._Rect__float_y_set) + width = property(_AHT._Rect__float_width_get, _AHT._Rect__float_width_set) + height = property(_AHT._Rect__float_height_get, _AHT._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _AHT._Rect__float___str__(self) + __swig_destroy__ = _AHT.delete__Rect__float + +# Register _Rect__float in _AHT: +_AHT._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Rect__double_swiginit(self, _AHT.new__Rect__double(*args)) + + def tl(self): + return _AHT._Rect__double_tl(self) + + def br(self): + return _AHT._Rect__double_br(self) + + def size(self): + return _AHT._Rect__double_size(self) + + def area(self): + return _AHT._Rect__double_area(self) + + def contains(self, pt): + return _AHT._Rect__double_contains(self, pt) + x = property(_AHT._Rect__double_x_get, _AHT._Rect__double_x_set) + y = property(_AHT._Rect__double_y_get, _AHT._Rect__double_y_set) + width = property(_AHT._Rect__double_width_get, _AHT._Rect__double_width_set) + height = property(_AHT._Rect__double_height_get, _AHT._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _AHT._Rect__double___str__(self) + __swig_destroy__ = _AHT.delete__Rect__double + +# Register _Rect__double in _AHT: +_AHT._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Scalar__double_swiginit(self, _AHT.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _AHT._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _AHT._Scalar__double_mul(self, a, scale) + + def conj(self): + return _AHT._Scalar__double_conj(self) + + def isReal(self): + return _AHT._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Scalar__double___str__(self) + __swig_destroy__ = _AHT.delete__Scalar__double + +# Register _Scalar__double in _AHT: +_AHT._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _AHT._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Size__int_swiginit(self, _AHT.new__Size__int(*args)) + + def area(self): + return _AHT._Size__int_area(self) + width = property(_AHT._Size__int_width_get, _AHT._Size__int_width_set) + height = property(_AHT._Size__int_height_get, _AHT._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _AHT._Size__int___str__(self) + __swig_destroy__ = _AHT.delete__Size__int + +# Register _Size__int in _AHT: +_AHT._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Size__float_swiginit(self, _AHT.new__Size__float(*args)) + + def area(self): + return _AHT._Size__float_area(self) + width = property(_AHT._Size__float_width_get, _AHT._Size__float_width_set) + height = property(_AHT._Size__float_height_get, _AHT._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _AHT._Size__float___str__(self) + __swig_destroy__ = _AHT.delete__Size__float + +# Register _Size__float in _AHT: +_AHT._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Size__double_swiginit(self, _AHT.new__Size__double(*args)) + + def area(self): + return _AHT._Size__double_area(self) + width = property(_AHT._Size__double_width_get, _AHT._Size__double_width_set) + height = property(_AHT._Size__double_height_get, _AHT._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _AHT._Size__double___str__(self) + __swig_destroy__ = _AHT.delete__Size__double + +# Register _Size__double in _AHT: +_AHT._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def AHT(file1, file2, outfile): + return _AHT.AHT(file1, file2, outfile) + + diff --git a/plugins/unsupervised_method/scripts/LHBA.py b/plugins/unsupervised_method/scripts/LHBA.py new file mode 100644 index 0000000..2d65146 --- /dev/null +++ b/plugins/unsupervised_method/scripts/LHBA.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _LHBA +else: + import _LHBA + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _LHBA.CV_VERSION_MAJOR +CV_VERSION_MINOR = _LHBA.CV_VERSION_MINOR +CV_VERSION_REVISION = _LHBA.CV_VERSION_REVISION +CV_VERSION_STATUS = _LHBA.CV_VERSION_STATUS +CV_VERSION = _LHBA.CV_VERSION +CV_MAJOR_VERSION = _LHBA.CV_MAJOR_VERSION +CV_MINOR_VERSION = _LHBA.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _LHBA.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_bool_generic_type + channels = _LHBA.DataType_bool_channels + fmt = _LHBA.DataType_bool_fmt + + def __init__(self): + _LHBA.DataType_bool_swiginit(self, _LHBA.new_DataType_bool()) + __swig_destroy__ = _LHBA.delete_DataType_bool + +# Register DataType_bool in _LHBA: +_LHBA.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_uchar_generic_type + channels = _LHBA.DataType_uchar_channels + fmt = _LHBA.DataType_uchar_fmt + + def __init__(self): + _LHBA.DataType_uchar_swiginit(self, _LHBA.new_DataType_uchar()) + __swig_destroy__ = _LHBA.delete_DataType_uchar + +# Register DataType_uchar in _LHBA: +_LHBA.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_schar_generic_type + channels = _LHBA.DataType_schar_channels + fmt = _LHBA.DataType_schar_fmt + + def __init__(self): + _LHBA.DataType_schar_swiginit(self, _LHBA.new_DataType_schar()) + __swig_destroy__ = _LHBA.delete_DataType_schar + +# Register DataType_schar in _LHBA: +_LHBA.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_char_generic_type + channels = _LHBA.DataType_char_channels + fmt = _LHBA.DataType_char_fmt + + def __init__(self): + _LHBA.DataType_char_swiginit(self, _LHBA.new_DataType_char()) + __swig_destroy__ = _LHBA.delete_DataType_char + +# Register DataType_char in _LHBA: +_LHBA.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_ushort_generic_type + channels = _LHBA.DataType_ushort_channels + fmt = _LHBA.DataType_ushort_fmt + + def __init__(self): + _LHBA.DataType_ushort_swiginit(self, _LHBA.new_DataType_ushort()) + __swig_destroy__ = _LHBA.delete_DataType_ushort + +# Register DataType_ushort in _LHBA: +_LHBA.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_short_generic_type + channels = _LHBA.DataType_short_channels + fmt = _LHBA.DataType_short_fmt + + def __init__(self): + _LHBA.DataType_short_swiginit(self, _LHBA.new_DataType_short()) + __swig_destroy__ = _LHBA.delete_DataType_short + +# Register DataType_short in _LHBA: +_LHBA.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_int_generic_type + channels = _LHBA.DataType_int_channels + fmt = _LHBA.DataType_int_fmt + + def __init__(self): + _LHBA.DataType_int_swiginit(self, _LHBA.new_DataType_int()) + __swig_destroy__ = _LHBA.delete_DataType_int + +# Register DataType_int in _LHBA: +_LHBA.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_float_generic_type + channels = _LHBA.DataType_float_channels + fmt = _LHBA.DataType_float_fmt + + def __init__(self): + _LHBA.DataType_float_swiginit(self, _LHBA.new_DataType_float()) + __swig_destroy__ = _LHBA.delete_DataType_float + +# Register DataType_float in _LHBA: +_LHBA.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_double_generic_type + channels = _LHBA.DataType_double_channels + fmt = _LHBA.DataType_double_fmt + + def __init__(self): + _LHBA.DataType_double_swiginit(self, _LHBA.new_DataType_double()) + __swig_destroy__ = _LHBA.delete_DataType_double + +# Register DataType_double in _LHBA: +_LHBA.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA.Range_swiginit(self, _LHBA.new_Range(*args)) + + def size(self): + return _LHBA.Range_size(self) + + def empty(self): + return _LHBA.Range_empty(self) + + @staticmethod + def all(): + return _LHBA.Range_all() + start = property(_LHBA.Range_start_get, _LHBA.Range_start_set) + end = property(_LHBA.Range_end_get, _LHBA.Range_end_set) + __swig_destroy__ = _LHBA.delete_Range + +# Register Range in _LHBA: +_LHBA.Range_swigregister(Range) + +def Range_all(): + return _LHBA.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _LHBA.delete_SwigPyIterator + + def value(self): + return _LHBA.SwigPyIterator_value(self) + + def incr(self, n=1): + return _LHBA.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _LHBA.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _LHBA.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _LHBA.SwigPyIterator_equal(self, x) + + def copy(self): + return _LHBA.SwigPyIterator_copy(self) + + def next(self): + return _LHBA.SwigPyIterator_next(self) + + def __next__(self): + return _LHBA.SwigPyIterator___next__(self) + + def previous(self): + return _LHBA.SwigPyIterator_previous(self) + + def advance(self, n): + return _LHBA.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _LHBA.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _LHBA.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _LHBA.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _LHBA.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _LHBA.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _LHBA.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _LHBA: +_LHBA.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_AddOp_swiginit(self, _LHBA.new_Matx_AddOp()) + __swig_destroy__ = _LHBA.delete_Matx_AddOp + +# Register Matx_AddOp in _LHBA: +_LHBA.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_SubOp_swiginit(self, _LHBA.new_Matx_SubOp()) + __swig_destroy__ = _LHBA.delete_Matx_SubOp + +# Register Matx_SubOp in _LHBA: +_LHBA.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_ScaleOp_swiginit(self, _LHBA.new_Matx_ScaleOp()) + __swig_destroy__ = _LHBA.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _LHBA: +_LHBA.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_MulOp_swiginit(self, _LHBA.new_Matx_MulOp()) + __swig_destroy__ = _LHBA.delete_Matx_MulOp + +# Register Matx_MulOp in _LHBA: +_LHBA.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_DivOp_swiginit(self, _LHBA.new_Matx_DivOp()) + __swig_destroy__ = _LHBA.delete_Matx_DivOp + +# Register Matx_DivOp in _LHBA: +_LHBA.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_MatMulOp_swiginit(self, _LHBA.new_Matx_MatMulOp()) + __swig_destroy__ = _LHBA.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _LHBA: +_LHBA.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_TOp_swiginit(self, _LHBA.new_Matx_TOp()) + __swig_destroy__ = _LHBA.delete_Matx_TOp + +# Register Matx_TOp in _LHBA: +_LHBA.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _LHBA.delete_Mat + + def row(self, y): + return _LHBA.Mat_row(self, y) + + def col(self, x): + return _LHBA.Mat_col(self, x) + + def rowRange(self, *args): + return _LHBA.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _LHBA.Mat_colRange(self, *args) + + def diag(self, d=0): + return _LHBA.Mat_diag(self, d) + + def clone(self): + return _LHBA.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _LHBA.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _LHBA.Mat_reshape(self, *args) + + def create(self, *args): + return _LHBA.Mat_create(self, *args) + + def addref(self): + return _LHBA.Mat_addref(self) + + def release(self): + return _LHBA.Mat_release(self) + + def deallocate(self): + return _LHBA.Mat_deallocate(self) + + def copySize(self, m): + return _LHBA.Mat_copySize(self, m) + + def reserve(self, sz): + return _LHBA.Mat_reserve(self, sz) + + def resize(self, *args): + return _LHBA.Mat_resize(self, *args) + + def push_back_(self, elem): + return _LHBA.Mat_push_back_(self, elem) + + def push_back(self, m): + return _LHBA.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _LHBA.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _LHBA.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA.Mat___call__(self, *args) + + def isContinuous(self): + return _LHBA.Mat_isContinuous(self) + + def isSubmatrix(self): + return _LHBA.Mat_isSubmatrix(self) + + def elemSize(self): + return _LHBA.Mat_elemSize(self) + + def elemSize1(self): + return _LHBA.Mat_elemSize1(self) + + def type(self): + return _LHBA.Mat_type(self) + + def depth(self): + return _LHBA.Mat_depth(self) + + def channels(self): + return _LHBA.Mat_channels(self) + + def step1(self, i=0): + return _LHBA.Mat_step1(self, i) + + def empty(self): + return _LHBA.Mat_empty(self) + + def total(self): + return _LHBA.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _LHBA.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _LHBA.Mat_ptr(self, *args) + MAGIC_VAL = _LHBA.Mat_MAGIC_VAL + AUTO_STEP = _LHBA.Mat_AUTO_STEP + CONTINUOUS_FLAG = _LHBA.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _LHBA.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _LHBA.Mat_MAGIC_MASK + TYPE_MASK = _LHBA.Mat_TYPE_MASK + DEPTH_MASK = _LHBA.Mat_DEPTH_MASK + flags = property(_LHBA.Mat_flags_get, _LHBA.Mat_flags_set) + dims = property(_LHBA.Mat_dims_get, _LHBA.Mat_dims_set) + rows = property(_LHBA.Mat_rows_get, _LHBA.Mat_rows_set) + cols = property(_LHBA.Mat_cols_get, _LHBA.Mat_cols_set) + data = property(_LHBA.Mat_data_get, _LHBA.Mat_data_set) + datastart = property(_LHBA.Mat_datastart_get, _LHBA.Mat_datastart_set) + dataend = property(_LHBA.Mat_dataend_get, _LHBA.Mat_dataend_set) + datalimit = property(_LHBA.Mat_datalimit_get, _LHBA.Mat_datalimit_set) + + def __init__(self, *args): + _LHBA.Mat_swiginit(self, _LHBA.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA.Mat___str__(self) + +# Register Mat in _LHBA: +_LHBA.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_uint8_t_swiginit(self, _LHBA.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _LHBA: +_LHBA._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _LHBA.uint8_tArray___bool__(self) + + def __len__(self): + return _LHBA.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _LHBA.uint8_tArray_pop(self) + + def append(self, x): + return _LHBA.uint8_tArray_append(self, x) + + def empty(self): + return _LHBA.uint8_tArray_empty(self) + + def size(self): + return _LHBA.uint8_tArray_size(self) + + def swap(self, v): + return _LHBA.uint8_tArray_swap(self, v) + + def begin(self): + return _LHBA.uint8_tArray_begin(self) + + def end(self): + return _LHBA.uint8_tArray_end(self) + + def rbegin(self): + return _LHBA.uint8_tArray_rbegin(self) + + def rend(self): + return _LHBA.uint8_tArray_rend(self) + + def clear(self): + return _LHBA.uint8_tArray_clear(self) + + def get_allocator(self): + return _LHBA.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _LHBA.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _LHBA.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.uint8_tArray_swiginit(self, _LHBA.new_uint8_tArray(*args)) + + def push_back(self, x): + return _LHBA.uint8_tArray_push_back(self, x) + + def front(self): + return _LHBA.uint8_tArray_front(self) + + def back(self): + return _LHBA.uint8_tArray_back(self) + + def assign(self, n, x): + return _LHBA.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.uint8_tArray_reserve(self, n) + + def capacity(self): + return _LHBA.uint8_tArray_capacity(self) + __swig_destroy__ = _LHBA.delete_uint8_tArray + +# Register uint8_tArray in _LHBA: +_LHBA.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_uint8_t_2_1_rows + cols = _LHBA._Matx_uint8_t_2_1_cols + channels = _LHBA._Matx_uint8_t_2_1_channels + shortdim = _LHBA._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_LHBA._Matx_uint8_t_2_1_val_get, _LHBA._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_uint8_t_2_1_swiginit(self, _LHBA.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _LHBA: +_LHBA._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _LHBA._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _LHBA._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _LHBA._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _LHBA._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _LHBA._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _LHBA._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_uint8_t_2_swiginit(self, _LHBA.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _LHBA: +_LHBA._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _LHBA._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_uint8_t_2_generic_type + channels = _LHBA._DataType_Vec_uint8_t_2_channels + fmt = _LHBA._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_uint8_t_2_swiginit(self, _LHBA.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _LHBA: +_LHBA._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_uint8_t_3_1_rows + cols = _LHBA._Matx_uint8_t_3_1_cols + channels = _LHBA._Matx_uint8_t_3_1_channels + shortdim = _LHBA._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_LHBA._Matx_uint8_t_3_1_val_get, _LHBA._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_uint8_t_3_1_swiginit(self, _LHBA.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _LHBA: +_LHBA._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _LHBA._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _LHBA._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _LHBA._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _LHBA._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _LHBA._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _LHBA._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_uint8_t_3_swiginit(self, _LHBA.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _LHBA: +_LHBA._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _LHBA._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_uint8_t_3_generic_type + channels = _LHBA._DataType_Vec_uint8_t_3_channels + fmt = _LHBA._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_uint8_t_3_swiginit(self, _LHBA.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _LHBA: +_LHBA._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_uint8_t_4_1_rows + cols = _LHBA._Matx_uint8_t_4_1_cols + channels = _LHBA._Matx_uint8_t_4_1_channels + shortdim = _LHBA._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_LHBA._Matx_uint8_t_4_1_val_get, _LHBA._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_uint8_t_4_1_swiginit(self, _LHBA.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _LHBA: +_LHBA._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _LHBA._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _LHBA._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _LHBA._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _LHBA._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _LHBA._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _LHBA._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_uint8_t_4_swiginit(self, _LHBA.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _LHBA: +_LHBA._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _LHBA._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_uint8_t_4_generic_type + channels = _LHBA._DataType_Vec_uint8_t_4_channels + fmt = _LHBA._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_uint8_t_4_swiginit(self, _LHBA.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _LHBA: +_LHBA._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_short_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_short_swiginit(self, _LHBA.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _LHBA: +_LHBA._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.shortArray___nonzero__(self) + + def __bool__(self): + return _LHBA.shortArray___bool__(self) + + def __len__(self): + return _LHBA.shortArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.shortArray___setitem__(self, *args) + + def pop(self): + return _LHBA.shortArray_pop(self) + + def append(self, x): + return _LHBA.shortArray_append(self, x) + + def empty(self): + return _LHBA.shortArray_empty(self) + + def size(self): + return _LHBA.shortArray_size(self) + + def swap(self, v): + return _LHBA.shortArray_swap(self, v) + + def begin(self): + return _LHBA.shortArray_begin(self) + + def end(self): + return _LHBA.shortArray_end(self) + + def rbegin(self): + return _LHBA.shortArray_rbegin(self) + + def rend(self): + return _LHBA.shortArray_rend(self) + + def clear(self): + return _LHBA.shortArray_clear(self) + + def get_allocator(self): + return _LHBA.shortArray_get_allocator(self) + + def pop_back(self): + return _LHBA.shortArray_pop_back(self) + + def erase(self, *args): + return _LHBA.shortArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.shortArray_swiginit(self, _LHBA.new_shortArray(*args)) + + def push_back(self, x): + return _LHBA.shortArray_push_back(self, x) + + def front(self): + return _LHBA.shortArray_front(self) + + def back(self): + return _LHBA.shortArray_back(self) + + def assign(self, n, x): + return _LHBA.shortArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.shortArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.shortArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.shortArray_reserve(self, n) + + def capacity(self): + return _LHBA.shortArray_capacity(self) + __swig_destroy__ = _LHBA.delete_shortArray + +# Register shortArray in _LHBA: +_LHBA.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_short_2_1_rows + cols = _LHBA._Matx_short_2_1_cols + channels = _LHBA._Matx_short_2_1_channels + shortdim = _LHBA._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_short_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_short_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_short_2_1___call__(self, i, j) + val = property(_LHBA._Matx_short_2_1_val_get, _LHBA._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_short_2_1_swiginit(self, _LHBA.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_short_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _LHBA: +_LHBA._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _LHBA._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _LHBA._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _LHBA._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _LHBA._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _LHBA._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _LHBA._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_short_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_short_2_swiginit(self, _LHBA.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_short_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_short_2 + +# Register _Vec_short_2 in _LHBA: +_LHBA._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _LHBA._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_short_2_generic_type + channels = _LHBA._DataType_Vec_short_2_channels + fmt = _LHBA._DataType_Vec_short_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_short_2_swiginit(self, _LHBA.new__DataType_Vec_short_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _LHBA: +_LHBA._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_short_3_1_rows + cols = _LHBA._Matx_short_3_1_cols + channels = _LHBA._Matx_short_3_1_channels + shortdim = _LHBA._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_short_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_short_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_short_3_1___call__(self, i, j) + val = property(_LHBA._Matx_short_3_1_val_get, _LHBA._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_short_3_1_swiginit(self, _LHBA.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_short_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _LHBA: +_LHBA._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _LHBA._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _LHBA._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _LHBA._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _LHBA._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _LHBA._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _LHBA._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_short_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_short_3_swiginit(self, _LHBA.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_short_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_short_3 + +# Register _Vec_short_3 in _LHBA: +_LHBA._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _LHBA._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_short_3_generic_type + channels = _LHBA._DataType_Vec_short_3_channels + fmt = _LHBA._DataType_Vec_short_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_short_3_swiginit(self, _LHBA.new__DataType_Vec_short_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _LHBA: +_LHBA._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_short_4_1_rows + cols = _LHBA._Matx_short_4_1_cols + channels = _LHBA._Matx_short_4_1_channels + shortdim = _LHBA._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_short_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_short_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_short_4_1___call__(self, i, j) + val = property(_LHBA._Matx_short_4_1_val_get, _LHBA._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_short_4_1_swiginit(self, _LHBA.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_short_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _LHBA: +_LHBA._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _LHBA._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _LHBA._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _LHBA._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _LHBA._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _LHBA._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _LHBA._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_short_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_short_4_swiginit(self, _LHBA.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_short_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_short_4 + +# Register _Vec_short_4 in _LHBA: +_LHBA._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _LHBA._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_short_4_generic_type + channels = _LHBA._DataType_Vec_short_4_channels + fmt = _LHBA._DataType_Vec_short_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_short_4_swiginit(self, _LHBA.new__DataType_Vec_short_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _LHBA: +_LHBA._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_ushort_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_ushort_swiginit(self, _LHBA.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _LHBA: +_LHBA._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.ushortArray___nonzero__(self) + + def __bool__(self): + return _LHBA.ushortArray___bool__(self) + + def __len__(self): + return _LHBA.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.ushortArray___setitem__(self, *args) + + def pop(self): + return _LHBA.ushortArray_pop(self) + + def append(self, x): + return _LHBA.ushortArray_append(self, x) + + def empty(self): + return _LHBA.ushortArray_empty(self) + + def size(self): + return _LHBA.ushortArray_size(self) + + def swap(self, v): + return _LHBA.ushortArray_swap(self, v) + + def begin(self): + return _LHBA.ushortArray_begin(self) + + def end(self): + return _LHBA.ushortArray_end(self) + + def rbegin(self): + return _LHBA.ushortArray_rbegin(self) + + def rend(self): + return _LHBA.ushortArray_rend(self) + + def clear(self): + return _LHBA.ushortArray_clear(self) + + def get_allocator(self): + return _LHBA.ushortArray_get_allocator(self) + + def pop_back(self): + return _LHBA.ushortArray_pop_back(self) + + def erase(self, *args): + return _LHBA.ushortArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.ushortArray_swiginit(self, _LHBA.new_ushortArray(*args)) + + def push_back(self, x): + return _LHBA.ushortArray_push_back(self, x) + + def front(self): + return _LHBA.ushortArray_front(self) + + def back(self): + return _LHBA.ushortArray_back(self) + + def assign(self, n, x): + return _LHBA.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.ushortArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.ushortArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.ushortArray_reserve(self, n) + + def capacity(self): + return _LHBA.ushortArray_capacity(self) + __swig_destroy__ = _LHBA.delete_ushortArray + +# Register ushortArray in _LHBA: +_LHBA.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_ushort_2_1_rows + cols = _LHBA._Matx_ushort_2_1_cols + channels = _LHBA._Matx_ushort_2_1_channels + shortdim = _LHBA._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_ushort_2_1___call__(self, i, j) + val = property(_LHBA._Matx_ushort_2_1_val_get, _LHBA._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_ushort_2_1_swiginit(self, _LHBA.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _LHBA: +_LHBA._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _LHBA._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _LHBA._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _LHBA._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _LHBA._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _LHBA._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _LHBA._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_ushort_2_swiginit(self, _LHBA.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_ushort_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _LHBA: +_LHBA._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _LHBA._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_ushort_2_generic_type + channels = _LHBA._DataType_Vec_ushort_2_channels + fmt = _LHBA._DataType_Vec_ushort_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_ushort_2_swiginit(self, _LHBA.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _LHBA: +_LHBA._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_ushort_3_1_rows + cols = _LHBA._Matx_ushort_3_1_cols + channels = _LHBA._Matx_ushort_3_1_channels + shortdim = _LHBA._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_ushort_3_1___call__(self, i, j) + val = property(_LHBA._Matx_ushort_3_1_val_get, _LHBA._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_ushort_3_1_swiginit(self, _LHBA.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _LHBA: +_LHBA._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _LHBA._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _LHBA._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _LHBA._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _LHBA._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _LHBA._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _LHBA._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_ushort_3_swiginit(self, _LHBA.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_ushort_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _LHBA: +_LHBA._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _LHBA._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_ushort_3_generic_type + channels = _LHBA._DataType_Vec_ushort_3_channels + fmt = _LHBA._DataType_Vec_ushort_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_ushort_3_swiginit(self, _LHBA.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _LHBA: +_LHBA._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_ushort_4_1_rows + cols = _LHBA._Matx_ushort_4_1_cols + channels = _LHBA._Matx_ushort_4_1_channels + shortdim = _LHBA._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_ushort_4_1___call__(self, i, j) + val = property(_LHBA._Matx_ushort_4_1_val_get, _LHBA._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_ushort_4_1_swiginit(self, _LHBA.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _LHBA: +_LHBA._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _LHBA._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _LHBA._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _LHBA._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _LHBA._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _LHBA._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _LHBA._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_ushort_4_swiginit(self, _LHBA.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_ushort_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _LHBA: +_LHBA._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _LHBA._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_ushort_4_generic_type + channels = _LHBA._DataType_Vec_ushort_4_channels + fmt = _LHBA._DataType_Vec_ushort_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_ushort_4_swiginit(self, _LHBA.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _LHBA: +_LHBA._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_int_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_int_swiginit(self, _LHBA.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _LHBA: +_LHBA._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.intArray___nonzero__(self) + + def __bool__(self): + return _LHBA.intArray___bool__(self) + + def __len__(self): + return _LHBA.intArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.intArray___setitem__(self, *args) + + def pop(self): + return _LHBA.intArray_pop(self) + + def append(self, x): + return _LHBA.intArray_append(self, x) + + def empty(self): + return _LHBA.intArray_empty(self) + + def size(self): + return _LHBA.intArray_size(self) + + def swap(self, v): + return _LHBA.intArray_swap(self, v) + + def begin(self): + return _LHBA.intArray_begin(self) + + def end(self): + return _LHBA.intArray_end(self) + + def rbegin(self): + return _LHBA.intArray_rbegin(self) + + def rend(self): + return _LHBA.intArray_rend(self) + + def clear(self): + return _LHBA.intArray_clear(self) + + def get_allocator(self): + return _LHBA.intArray_get_allocator(self) + + def pop_back(self): + return _LHBA.intArray_pop_back(self) + + def erase(self, *args): + return _LHBA.intArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.intArray_swiginit(self, _LHBA.new_intArray(*args)) + + def push_back(self, x): + return _LHBA.intArray_push_back(self, x) + + def front(self): + return _LHBA.intArray_front(self) + + def back(self): + return _LHBA.intArray_back(self) + + def assign(self, n, x): + return _LHBA.intArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.intArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.intArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.intArray_reserve(self, n) + + def capacity(self): + return _LHBA.intArray_capacity(self) + __swig_destroy__ = _LHBA.delete_intArray + +# Register intArray in _LHBA: +_LHBA.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_2_1_rows + cols = _LHBA._Matx_int_2_1_cols + channels = _LHBA._Matx_int_2_1_channels + shortdim = _LHBA._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_2_1___call__(self, i, j) + val = property(_LHBA._Matx_int_2_1_val_get, _LHBA._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_2_1_swiginit(self, _LHBA.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _LHBA: +_LHBA._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _LHBA._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _LHBA._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _LHBA._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _LHBA._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _LHBA._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _LHBA._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_2_swiginit(self, _LHBA.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_2 + +# Register _Vec_int_2 in _LHBA: +_LHBA._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _LHBA._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_2_generic_type + channels = _LHBA._DataType_Vec_int_2_channels + fmt = _LHBA._DataType_Vec_int_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_2_swiginit(self, _LHBA.new__DataType_Vec_int_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _LHBA: +_LHBA._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_3_1_rows + cols = _LHBA._Matx_int_3_1_cols + channels = _LHBA._Matx_int_3_1_channels + shortdim = _LHBA._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_3_1___call__(self, i, j) + val = property(_LHBA._Matx_int_3_1_val_get, _LHBA._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_3_1_swiginit(self, _LHBA.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _LHBA: +_LHBA._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _LHBA._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _LHBA._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _LHBA._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _LHBA._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _LHBA._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _LHBA._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_3_swiginit(self, _LHBA.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_3 + +# Register _Vec_int_3 in _LHBA: +_LHBA._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _LHBA._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_3_generic_type + channels = _LHBA._DataType_Vec_int_3_channels + fmt = _LHBA._DataType_Vec_int_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_3_swiginit(self, _LHBA.new__DataType_Vec_int_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _LHBA: +_LHBA._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_4_1_rows + cols = _LHBA._Matx_int_4_1_cols + channels = _LHBA._Matx_int_4_1_channels + shortdim = _LHBA._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_4_1___call__(self, i, j) + val = property(_LHBA._Matx_int_4_1_val_get, _LHBA._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_4_1_swiginit(self, _LHBA.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _LHBA: +_LHBA._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _LHBA._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _LHBA._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _LHBA._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _LHBA._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _LHBA._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _LHBA._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_4_swiginit(self, _LHBA.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_4 + +# Register _Vec_int_4 in _LHBA: +_LHBA._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _LHBA._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_4_generic_type + channels = _LHBA._DataType_Vec_int_4_channels + fmt = _LHBA._DataType_Vec_int_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_4_swiginit(self, _LHBA.new__DataType_Vec_int_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _LHBA: +_LHBA._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_6_1_rows + cols = _LHBA._Matx_int_6_1_cols + channels = _LHBA._Matx_int_6_1_channels + shortdim = _LHBA._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_6_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_6_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_6_1___call__(self, i, j) + val = property(_LHBA._Matx_int_6_1_val_get, _LHBA._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_6_1_swiginit(self, _LHBA.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_6_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _LHBA: +_LHBA._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _LHBA._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _LHBA._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _LHBA._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _LHBA._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _LHBA._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _LHBA._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_6_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_6_swiginit(self, _LHBA.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_6___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_6 + +# Register _Vec_int_6 in _LHBA: +_LHBA._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _LHBA._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_6_generic_type + channels = _LHBA._DataType_Vec_int_6_channels + fmt = _LHBA._DataType_Vec_int_6_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_6_swiginit(self, _LHBA.new__DataType_Vec_int_6()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _LHBA: +_LHBA._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_8_1_rows + cols = _LHBA._Matx_int_8_1_cols + channels = _LHBA._Matx_int_8_1_channels + shortdim = _LHBA._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_8_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_8_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_8_1___call__(self, i, j) + val = property(_LHBA._Matx_int_8_1_val_get, _LHBA._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_8_1_swiginit(self, _LHBA.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_8_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _LHBA: +_LHBA._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _LHBA._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _LHBA._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _LHBA._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _LHBA._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _LHBA._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _LHBA._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_8_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_8_swiginit(self, _LHBA.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_8___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_8 + +# Register _Vec_int_8 in _LHBA: +_LHBA._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _LHBA._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_8_generic_type + channels = _LHBA._DataType_Vec_int_8_channels + fmt = _LHBA._DataType_Vec_int_8_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_8_swiginit(self, _LHBA.new__DataType_Vec_int_8()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _LHBA: +_LHBA._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_float_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_float_swiginit(self, _LHBA.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _LHBA: +_LHBA._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.floatArray___nonzero__(self) + + def __bool__(self): + return _LHBA.floatArray___bool__(self) + + def __len__(self): + return _LHBA.floatArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.floatArray___setitem__(self, *args) + + def pop(self): + return _LHBA.floatArray_pop(self) + + def append(self, x): + return _LHBA.floatArray_append(self, x) + + def empty(self): + return _LHBA.floatArray_empty(self) + + def size(self): + return _LHBA.floatArray_size(self) + + def swap(self, v): + return _LHBA.floatArray_swap(self, v) + + def begin(self): + return _LHBA.floatArray_begin(self) + + def end(self): + return _LHBA.floatArray_end(self) + + def rbegin(self): + return _LHBA.floatArray_rbegin(self) + + def rend(self): + return _LHBA.floatArray_rend(self) + + def clear(self): + return _LHBA.floatArray_clear(self) + + def get_allocator(self): + return _LHBA.floatArray_get_allocator(self) + + def pop_back(self): + return _LHBA.floatArray_pop_back(self) + + def erase(self, *args): + return _LHBA.floatArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.floatArray_swiginit(self, _LHBA.new_floatArray(*args)) + + def push_back(self, x): + return _LHBA.floatArray_push_back(self, x) + + def front(self): + return _LHBA.floatArray_front(self) + + def back(self): + return _LHBA.floatArray_back(self) + + def assign(self, n, x): + return _LHBA.floatArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.floatArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.floatArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.floatArray_reserve(self, n) + + def capacity(self): + return _LHBA.floatArray_capacity(self) + __swig_destroy__ = _LHBA.delete_floatArray + +# Register floatArray in _LHBA: +_LHBA.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_2_1_rows + cols = _LHBA._Matx_float_2_1_cols + channels = _LHBA._Matx_float_2_1_channels + shortdim = _LHBA._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_2_1___call__(self, i, j) + val = property(_LHBA._Matx_float_2_1_val_get, _LHBA._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_2_1_swiginit(self, _LHBA.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _LHBA: +_LHBA._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _LHBA._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _LHBA._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _LHBA._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _LHBA._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _LHBA._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _LHBA._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_float_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_float_2_swiginit(self, _LHBA.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_float_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_float_2 + +# Register _Vec_float_2 in _LHBA: +_LHBA._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _LHBA._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_float_2_generic_type + channels = _LHBA._DataType_Vec_float_2_channels + fmt = _LHBA._DataType_Vec_float_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_float_2_swiginit(self, _LHBA.new__DataType_Vec_float_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _LHBA: +_LHBA._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_3_1_rows + cols = _LHBA._Matx_float_3_1_cols + channels = _LHBA._Matx_float_3_1_channels + shortdim = _LHBA._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_3_1___call__(self, i, j) + val = property(_LHBA._Matx_float_3_1_val_get, _LHBA._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_3_1_swiginit(self, _LHBA.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _LHBA: +_LHBA._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _LHBA._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _LHBA._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _LHBA._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _LHBA._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _LHBA._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _LHBA._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_float_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_float_3_swiginit(self, _LHBA.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_float_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_float_3 + +# Register _Vec_float_3 in _LHBA: +_LHBA._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _LHBA._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_float_3_generic_type + channels = _LHBA._DataType_Vec_float_3_channels + fmt = _LHBA._DataType_Vec_float_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_float_3_swiginit(self, _LHBA.new__DataType_Vec_float_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _LHBA: +_LHBA._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_4_1_rows + cols = _LHBA._Matx_float_4_1_cols + channels = _LHBA._Matx_float_4_1_channels + shortdim = _LHBA._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_4_1___call__(self, i, j) + val = property(_LHBA._Matx_float_4_1_val_get, _LHBA._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_4_1_swiginit(self, _LHBA.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _LHBA: +_LHBA._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _LHBA._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _LHBA._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _LHBA._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _LHBA._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _LHBA._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _LHBA._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_float_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_float_4_swiginit(self, _LHBA.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_float_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_float_4 + +# Register _Vec_float_4 in _LHBA: +_LHBA._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _LHBA._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_float_4_generic_type + channels = _LHBA._DataType_Vec_float_4_channels + fmt = _LHBA._DataType_Vec_float_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_float_4_swiginit(self, _LHBA.new__DataType_Vec_float_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _LHBA: +_LHBA._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_6_1_rows + cols = _LHBA._Matx_float_6_1_cols + channels = _LHBA._Matx_float_6_1_channels + shortdim = _LHBA._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_6_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_6_1_t(self) + + def mul(self, a): + return _LHBA._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_6_1___call__(self, i, j) + val = property(_LHBA._Matx_float_6_1_val_get, _LHBA._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_6_1_swiginit(self, _LHBA.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_6_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _LHBA: +_LHBA._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _LHBA._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _LHBA._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _LHBA._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _LHBA._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _LHBA._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _LHBA._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_float_6_all(alpha) + + def mul(self, v): + return _LHBA._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_float_6_swiginit(self, _LHBA.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_float_6___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_float_6 + +# Register _Vec_float_6 in _LHBA: +_LHBA._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _LHBA._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_float_6_generic_type + channels = _LHBA._DataType_Vec_float_6_channels + fmt = _LHBA._DataType_Vec_float_6_fmt + + def __init__(self): + _LHBA._DataType_Vec_float_6_swiginit(self, _LHBA.new__DataType_Vec_float_6()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _LHBA: +_LHBA._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_double_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_double_swiginit(self, _LHBA.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _LHBA: +_LHBA._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.doubleArray___nonzero__(self) + + def __bool__(self): + return _LHBA.doubleArray___bool__(self) + + def __len__(self): + return _LHBA.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.doubleArray___setitem__(self, *args) + + def pop(self): + return _LHBA.doubleArray_pop(self) + + def append(self, x): + return _LHBA.doubleArray_append(self, x) + + def empty(self): + return _LHBA.doubleArray_empty(self) + + def size(self): + return _LHBA.doubleArray_size(self) + + def swap(self, v): + return _LHBA.doubleArray_swap(self, v) + + def begin(self): + return _LHBA.doubleArray_begin(self) + + def end(self): + return _LHBA.doubleArray_end(self) + + def rbegin(self): + return _LHBA.doubleArray_rbegin(self) + + def rend(self): + return _LHBA.doubleArray_rend(self) + + def clear(self): + return _LHBA.doubleArray_clear(self) + + def get_allocator(self): + return _LHBA.doubleArray_get_allocator(self) + + def pop_back(self): + return _LHBA.doubleArray_pop_back(self) + + def erase(self, *args): + return _LHBA.doubleArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.doubleArray_swiginit(self, _LHBA.new_doubleArray(*args)) + + def push_back(self, x): + return _LHBA.doubleArray_push_back(self, x) + + def front(self): + return _LHBA.doubleArray_front(self) + + def back(self): + return _LHBA.doubleArray_back(self) + + def assign(self, n, x): + return _LHBA.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.doubleArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.doubleArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.doubleArray_reserve(self, n) + + def capacity(self): + return _LHBA.doubleArray_capacity(self) + __swig_destroy__ = _LHBA.delete_doubleArray + +# Register doubleArray in _LHBA: +_LHBA.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_2_1_rows + cols = _LHBA._Matx_double_2_1_cols + channels = _LHBA._Matx_double_2_1_channels + shortdim = _LHBA._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_2_1___call__(self, i, j) + val = property(_LHBA._Matx_double_2_1_val_get, _LHBA._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_2_1_swiginit(self, _LHBA.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _LHBA: +_LHBA._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _LHBA._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _LHBA._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _LHBA._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _LHBA._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _LHBA._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _LHBA._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_double_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_double_2_swiginit(self, _LHBA.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_double_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_double_2 + +# Register _Vec_double_2 in _LHBA: +_LHBA._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _LHBA._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_double_2_generic_type + channels = _LHBA._DataType_Vec_double_2_channels + fmt = _LHBA._DataType_Vec_double_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_double_2_swiginit(self, _LHBA.new__DataType_Vec_double_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _LHBA: +_LHBA._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_3_1_rows + cols = _LHBA._Matx_double_3_1_cols + channels = _LHBA._Matx_double_3_1_channels + shortdim = _LHBA._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_3_1___call__(self, i, j) + val = property(_LHBA._Matx_double_3_1_val_get, _LHBA._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_3_1_swiginit(self, _LHBA.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _LHBA: +_LHBA._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _LHBA._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _LHBA._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _LHBA._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _LHBA._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _LHBA._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _LHBA._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_double_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_double_3_swiginit(self, _LHBA.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_double_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_double_3 + +# Register _Vec_double_3 in _LHBA: +_LHBA._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _LHBA._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_double_3_generic_type + channels = _LHBA._DataType_Vec_double_3_channels + fmt = _LHBA._DataType_Vec_double_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_double_3_swiginit(self, _LHBA.new__DataType_Vec_double_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _LHBA: +_LHBA._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_4_1_rows + cols = _LHBA._Matx_double_4_1_cols + channels = _LHBA._Matx_double_4_1_channels + shortdim = _LHBA._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_4_1___call__(self, i, j) + val = property(_LHBA._Matx_double_4_1_val_get, _LHBA._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_4_1_swiginit(self, _LHBA.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _LHBA: +_LHBA._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _LHBA._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _LHBA._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _LHBA._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _LHBA._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _LHBA._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _LHBA._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_double_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_double_4_swiginit(self, _LHBA.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_double_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_double_4 + +# Register _Vec_double_4 in _LHBA: +_LHBA._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _LHBA._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_double_4_generic_type + channels = _LHBA._DataType_Vec_double_4_channels + fmt = _LHBA._DataType_Vec_double_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_double_4_swiginit(self, _LHBA.new__DataType_Vec_double_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _LHBA: +_LHBA._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_6_1_rows + cols = _LHBA._Matx_double_6_1_cols + channels = _LHBA._Matx_double_6_1_channels + shortdim = _LHBA._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_6_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_6_1_t(self) + + def mul(self, a): + return _LHBA._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_6_1___call__(self, i, j) + val = property(_LHBA._Matx_double_6_1_val_get, _LHBA._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_6_1_swiginit(self, _LHBA.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_6_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _LHBA: +_LHBA._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _LHBA._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _LHBA._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _LHBA._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _LHBA._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _LHBA._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _LHBA._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_double_6_all(alpha) + + def mul(self, v): + return _LHBA._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_double_6_swiginit(self, _LHBA.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_double_6___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_double_6 + +# Register _Vec_double_6 in _LHBA: +_LHBA._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _LHBA._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_double_6_generic_type + channels = _LHBA._DataType_Vec_double_6_channels + fmt = _LHBA._DataType_Vec_double_6_fmt + + def __init__(self): + _LHBA._DataType_Vec_double_6_swiginit(self, _LHBA.new__DataType_Vec_double_6()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _LHBA: +_LHBA._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA._mat__np_array_constructor_swiginit(self, _LHBA.new__mat__np_array_constructor()) + __swig_destroy__ = _LHBA.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _LHBA: +_LHBA._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _LHBA._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _LHBA._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_uchar_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_uchar_swiginit(self, _LHBA.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _LHBA: +_LHBA._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__uchar_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__uchar_cross(self, m) + + def row(self, y): + return _LHBA._Mat__uchar_row(self, y) + + def col(self, x): + return _LHBA._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__uchar_diag(self, d) + + def clone(self): + return _LHBA._Mat__uchar_clone(self) + + def elemSize(self): + return _LHBA._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__uchar_elemSize1(self) + + def type(self): + return _LHBA._Mat__uchar_type(self) + + def depth(self): + return _LHBA._Mat__uchar_depth(self) + + def channels(self): + return _LHBA._Mat__uchar_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__uchar_swiginit(self, _LHBA.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__uchar___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__uchar + +# Register _Mat__uchar in _LHBA: +_LHBA._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2b_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2b_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2b_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2b_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2b_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2b_type(self) + + def depth(self): + return _LHBA._Mat__Vec2b_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2b_swiginit(self, _LHBA.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2b___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _LHBA: +_LHBA._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3b_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3b_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3b_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3b_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3b_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3b_type(self) + + def depth(self): + return _LHBA._Mat__Vec3b_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3b_swiginit(self, _LHBA.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3b___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _LHBA: +_LHBA._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4b_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4b_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4b_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4b_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4b_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4b_type(self) + + def depth(self): + return _LHBA._Mat__Vec4b_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4b_swiginit(self, _LHBA.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4b___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _LHBA: +_LHBA._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__short_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__short_cross(self, m) + + def row(self, y): + return _LHBA._Mat__short_row(self, y) + + def col(self, x): + return _LHBA._Mat__short_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__short_diag(self, d) + + def clone(self): + return _LHBA._Mat__short_clone(self) + + def elemSize(self): + return _LHBA._Mat__short_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__short_elemSize1(self) + + def type(self): + return _LHBA._Mat__short_type(self) + + def depth(self): + return _LHBA._Mat__short_depth(self) + + def channels(self): + return _LHBA._Mat__short_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__short___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__short_swiginit(self, _LHBA.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__short___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__short + +# Register _Mat__short in _LHBA: +_LHBA._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2s_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2s_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2s_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2s_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2s_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2s_type(self) + + def depth(self): + return _LHBA._Mat__Vec2s_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2s_swiginit(self, _LHBA.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2s___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _LHBA: +_LHBA._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3s_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3s_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3s_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3s_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3s_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3s_type(self) + + def depth(self): + return _LHBA._Mat__Vec3s_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3s_swiginit(self, _LHBA.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3s___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _LHBA: +_LHBA._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4s_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4s_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4s_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4s_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4s_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4s_type(self) + + def depth(self): + return _LHBA._Mat__Vec4s_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4s_swiginit(self, _LHBA.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4s___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _LHBA: +_LHBA._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__ushort_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__ushort_cross(self, m) + + def row(self, y): + return _LHBA._Mat__ushort_row(self, y) + + def col(self, x): + return _LHBA._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__ushort_diag(self, d) + + def clone(self): + return _LHBA._Mat__ushort_clone(self) + + def elemSize(self): + return _LHBA._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__ushort_elemSize1(self) + + def type(self): + return _LHBA._Mat__ushort_type(self) + + def depth(self): + return _LHBA._Mat__ushort_depth(self) + + def channels(self): + return _LHBA._Mat__ushort_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__ushort_swiginit(self, _LHBA.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__ushort___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__ushort + +# Register _Mat__ushort in _LHBA: +_LHBA._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2w_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2w_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2w_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2w_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2w_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2w_type(self) + + def depth(self): + return _LHBA._Mat__Vec2w_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2w_swiginit(self, _LHBA.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2w___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _LHBA: +_LHBA._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3w_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3w_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3w_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3w_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3w_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3w_type(self) + + def depth(self): + return _LHBA._Mat__Vec3w_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3w_swiginit(self, _LHBA.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3w___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _LHBA: +_LHBA._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4w_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4w_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4w_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4w_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4w_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4w_type(self) + + def depth(self): + return _LHBA._Mat__Vec4w_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4w_swiginit(self, _LHBA.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4w___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _LHBA: +_LHBA._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__int_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__int_cross(self, m) + + def row(self, y): + return _LHBA._Mat__int_row(self, y) + + def col(self, x): + return _LHBA._Mat__int_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__int_diag(self, d) + + def clone(self): + return _LHBA._Mat__int_clone(self) + + def elemSize(self): + return _LHBA._Mat__int_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__int_elemSize1(self) + + def type(self): + return _LHBA._Mat__int_type(self) + + def depth(self): + return _LHBA._Mat__int_depth(self) + + def channels(self): + return _LHBA._Mat__int_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__int___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__int_swiginit(self, _LHBA.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__int___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__int + +# Register _Mat__int in _LHBA: +_LHBA._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2i_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2i_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2i_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2i_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2i_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2i_type(self) + + def depth(self): + return _LHBA._Mat__Vec2i_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2i_swiginit(self, _LHBA.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2i___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _LHBA: +_LHBA._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3i_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3i_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3i_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3i_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3i_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3i_type(self) + + def depth(self): + return _LHBA._Mat__Vec3i_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3i_swiginit(self, _LHBA.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3i___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _LHBA: +_LHBA._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4i_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4i_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4i_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4i_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4i_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4i_type(self) + + def depth(self): + return _LHBA._Mat__Vec4i_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4i_swiginit(self, _LHBA.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4i___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _LHBA: +_LHBA._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__float_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__float_cross(self, m) + + def row(self, y): + return _LHBA._Mat__float_row(self, y) + + def col(self, x): + return _LHBA._Mat__float_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__float_diag(self, d) + + def clone(self): + return _LHBA._Mat__float_clone(self) + + def elemSize(self): + return _LHBA._Mat__float_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__float_elemSize1(self) + + def type(self): + return _LHBA._Mat__float_type(self) + + def depth(self): + return _LHBA._Mat__float_depth(self) + + def channels(self): + return _LHBA._Mat__float_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__float___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__float_swiginit(self, _LHBA.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__float___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__float + +# Register _Mat__float in _LHBA: +_LHBA._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2f_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2f_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2f_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2f_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2f_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2f_type(self) + + def depth(self): + return _LHBA._Mat__Vec2f_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2f_swiginit(self, _LHBA.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2f___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _LHBA: +_LHBA._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3f_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3f_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3f_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3f_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3f_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3f_type(self) + + def depth(self): + return _LHBA._Mat__Vec3f_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3f_swiginit(self, _LHBA.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3f___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _LHBA: +_LHBA._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4f_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4f_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4f_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4f_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4f_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4f_type(self) + + def depth(self): + return _LHBA._Mat__Vec4f_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4f_swiginit(self, _LHBA.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4f___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _LHBA: +_LHBA._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__double_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__double_cross(self, m) + + def row(self, y): + return _LHBA._Mat__double_row(self, y) + + def col(self, x): + return _LHBA._Mat__double_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__double_diag(self, d) + + def clone(self): + return _LHBA._Mat__double_clone(self) + + def elemSize(self): + return _LHBA._Mat__double_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__double_elemSize1(self) + + def type(self): + return _LHBA._Mat__double_type(self) + + def depth(self): + return _LHBA._Mat__double_depth(self) + + def channels(self): + return _LHBA._Mat__double_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__double___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__double_swiginit(self, _LHBA.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__double___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__double + +# Register _Mat__double in _LHBA: +_LHBA._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2d_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2d_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2d_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2d_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2d_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2d_type(self) + + def depth(self): + return _LHBA._Mat__Vec2d_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2d_swiginit(self, _LHBA.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2d___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _LHBA: +_LHBA._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3d_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3d_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3d_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3d_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3d_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3d_type(self) + + def depth(self): + return _LHBA._Mat__Vec3d_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3d_swiginit(self, _LHBA.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3d___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _LHBA: +_LHBA._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4d_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4d_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4d_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4d_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4d_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4d_type(self) + + def depth(self): + return _LHBA._Mat__Vec4d_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4d_swiginit(self, _LHBA.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4d___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _LHBA: +_LHBA._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_1_2_rows + cols = _LHBA._Matx_float_1_2_cols + channels = _LHBA._Matx_float_1_2_channels + shortdim = _LHBA._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_1_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_1_2_t(self) + + def mul(self, a): + return _LHBA._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_1_2___call__(self, i, j) + val = property(_LHBA._Matx_float_1_2_val_get, _LHBA._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_1_2_swiginit(self, _LHBA.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_1_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _LHBA: +_LHBA._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _LHBA._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _LHBA._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _LHBA._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _LHBA._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _LHBA._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _LHBA._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_1_2_rows + cols = _LHBA._Matx_double_1_2_cols + channels = _LHBA._Matx_double_1_2_channels + shortdim = _LHBA._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_1_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_1_2_t(self) + + def mul(self, a): + return _LHBA._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_1_2___call__(self, i, j) + val = property(_LHBA._Matx_double_1_2_val_get, _LHBA._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_1_2_swiginit(self, _LHBA.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_1_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _LHBA: +_LHBA._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _LHBA._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _LHBA._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _LHBA._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _LHBA._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _LHBA._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _LHBA._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_1_3_rows + cols = _LHBA._Matx_float_1_3_cols + channels = _LHBA._Matx_float_1_3_channels + shortdim = _LHBA._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_1_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_1_3_t(self) + + def mul(self, a): + return _LHBA._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_1_3___call__(self, i, j) + val = property(_LHBA._Matx_float_1_3_val_get, _LHBA._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_1_3_swiginit(self, _LHBA.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_1_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _LHBA: +_LHBA._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _LHBA._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _LHBA._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _LHBA._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _LHBA._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _LHBA._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _LHBA._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_1_3_rows + cols = _LHBA._Matx_double_1_3_cols + channels = _LHBA._Matx_double_1_3_channels + shortdim = _LHBA._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_1_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_1_3_t(self) + + def mul(self, a): + return _LHBA._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_1_3___call__(self, i, j) + val = property(_LHBA._Matx_double_1_3_val_get, _LHBA._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_1_3_swiginit(self, _LHBA.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_1_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _LHBA: +_LHBA._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _LHBA._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _LHBA._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _LHBA._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _LHBA._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _LHBA._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _LHBA._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_1_4_rows + cols = _LHBA._Matx_float_1_4_cols + channels = _LHBA._Matx_float_1_4_channels + shortdim = _LHBA._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_1_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_1_4_t(self) + + def mul(self, a): + return _LHBA._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_1_4___call__(self, i, j) + val = property(_LHBA._Matx_float_1_4_val_get, _LHBA._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_1_4_swiginit(self, _LHBA.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_1_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _LHBA: +_LHBA._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _LHBA._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _LHBA._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _LHBA._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _LHBA._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _LHBA._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _LHBA._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_1_4_rows + cols = _LHBA._Matx_double_1_4_cols + channels = _LHBA._Matx_double_1_4_channels + shortdim = _LHBA._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_1_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_1_4_t(self) + + def mul(self, a): + return _LHBA._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_1_4___call__(self, i, j) + val = property(_LHBA._Matx_double_1_4_val_get, _LHBA._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_1_4_swiginit(self, _LHBA.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_1_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _LHBA: +_LHBA._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _LHBA._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _LHBA._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _LHBA._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _LHBA._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _LHBA._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _LHBA._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_1_6_rows + cols = _LHBA._Matx_float_1_6_cols + channels = _LHBA._Matx_float_1_6_channels + shortdim = _LHBA._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_1_6_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_1_6_t(self) + + def mul(self, a): + return _LHBA._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_1_6___call__(self, i, j) + val = property(_LHBA._Matx_float_1_6_val_get, _LHBA._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_1_6_swiginit(self, _LHBA.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_1_6___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _LHBA: +_LHBA._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _LHBA._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _LHBA._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _LHBA._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _LHBA._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _LHBA._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _LHBA._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_1_6_rows + cols = _LHBA._Matx_double_1_6_cols + channels = _LHBA._Matx_double_1_6_channels + shortdim = _LHBA._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_1_6_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_1_6_t(self) + + def mul(self, a): + return _LHBA._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_1_6___call__(self, i, j) + val = property(_LHBA._Matx_double_1_6_val_get, _LHBA._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_1_6_swiginit(self, _LHBA.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_1_6___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _LHBA: +_LHBA._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _LHBA._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _LHBA._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _LHBA._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _LHBA._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _LHBA._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _LHBA._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_2_2_rows + cols = _LHBA._Matx_float_2_2_cols + channels = _LHBA._Matx_float_2_2_channels + shortdim = _LHBA._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_2_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_2_2_t(self) + + def mul(self, a): + return _LHBA._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_2_2___call__(self, i, j) + val = property(_LHBA._Matx_float_2_2_val_get, _LHBA._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_2_2_swiginit(self, _LHBA.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_2_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _LHBA: +_LHBA._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _LHBA._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _LHBA._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _LHBA._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _LHBA._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _LHBA._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _LHBA._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_2_2_rows + cols = _LHBA._Matx_double_2_2_cols + channels = _LHBA._Matx_double_2_2_channels + shortdim = _LHBA._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_2_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_2_2_t(self) + + def mul(self, a): + return _LHBA._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_2_2___call__(self, i, j) + val = property(_LHBA._Matx_double_2_2_val_get, _LHBA._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_2_2_swiginit(self, _LHBA.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_2_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _LHBA: +_LHBA._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _LHBA._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _LHBA._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _LHBA._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _LHBA._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _LHBA._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _LHBA._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_2_3_rows + cols = _LHBA._Matx_float_2_3_cols + channels = _LHBA._Matx_float_2_3_channels + shortdim = _LHBA._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_2_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_2_3_t(self) + + def mul(self, a): + return _LHBA._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_2_3___call__(self, i, j) + val = property(_LHBA._Matx_float_2_3_val_get, _LHBA._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_2_3_swiginit(self, _LHBA.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_2_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _LHBA: +_LHBA._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _LHBA._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _LHBA._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _LHBA._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _LHBA._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _LHBA._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _LHBA._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_2_3_rows + cols = _LHBA._Matx_double_2_3_cols + channels = _LHBA._Matx_double_2_3_channels + shortdim = _LHBA._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_2_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_2_3_t(self) + + def mul(self, a): + return _LHBA._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_2_3___call__(self, i, j) + val = property(_LHBA._Matx_double_2_3_val_get, _LHBA._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_2_3_swiginit(self, _LHBA.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_2_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _LHBA: +_LHBA._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _LHBA._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _LHBA._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _LHBA._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _LHBA._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _LHBA._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _LHBA._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_3_2_rows + cols = _LHBA._Matx_float_3_2_cols + channels = _LHBA._Matx_float_3_2_channels + shortdim = _LHBA._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_3_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_3_2_t(self) + + def mul(self, a): + return _LHBA._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_3_2___call__(self, i, j) + val = property(_LHBA._Matx_float_3_2_val_get, _LHBA._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_3_2_swiginit(self, _LHBA.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_3_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _LHBA: +_LHBA._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _LHBA._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _LHBA._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _LHBA._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _LHBA._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _LHBA._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _LHBA._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_3_2_rows + cols = _LHBA._Matx_double_3_2_cols + channels = _LHBA._Matx_double_3_2_channels + shortdim = _LHBA._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_3_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_3_2_t(self) + + def mul(self, a): + return _LHBA._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_3_2___call__(self, i, j) + val = property(_LHBA._Matx_double_3_2_val_get, _LHBA._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_3_2_swiginit(self, _LHBA.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_3_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _LHBA: +_LHBA._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _LHBA._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _LHBA._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _LHBA._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _LHBA._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _LHBA._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _LHBA._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_3_3_rows + cols = _LHBA._Matx_float_3_3_cols + channels = _LHBA._Matx_float_3_3_channels + shortdim = _LHBA._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_3_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_3_3_t(self) + + def mul(self, a): + return _LHBA._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_3_3___call__(self, i, j) + val = property(_LHBA._Matx_float_3_3_val_get, _LHBA._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_3_3_swiginit(self, _LHBA.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_3_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _LHBA: +_LHBA._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _LHBA._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _LHBA._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _LHBA._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _LHBA._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _LHBA._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _LHBA._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_3_3_rows + cols = _LHBA._Matx_double_3_3_cols + channels = _LHBA._Matx_double_3_3_channels + shortdim = _LHBA._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_3_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_3_3_t(self) + + def mul(self, a): + return _LHBA._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_3_3___call__(self, i, j) + val = property(_LHBA._Matx_double_3_3_val_get, _LHBA._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_3_3_swiginit(self, _LHBA.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_3_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _LHBA: +_LHBA._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _LHBA._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _LHBA._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _LHBA._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _LHBA._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _LHBA._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _LHBA._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_3_4_rows + cols = _LHBA._Matx_float_3_4_cols + channels = _LHBA._Matx_float_3_4_channels + shortdim = _LHBA._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_3_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_3_4_t(self) + + def mul(self, a): + return _LHBA._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_3_4___call__(self, i, j) + val = property(_LHBA._Matx_float_3_4_val_get, _LHBA._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_3_4_swiginit(self, _LHBA.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_3_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _LHBA: +_LHBA._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _LHBA._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _LHBA._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _LHBA._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _LHBA._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _LHBA._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _LHBA._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_3_4_rows + cols = _LHBA._Matx_double_3_4_cols + channels = _LHBA._Matx_double_3_4_channels + shortdim = _LHBA._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_3_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_3_4_t(self) + + def mul(self, a): + return _LHBA._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_3_4___call__(self, i, j) + val = property(_LHBA._Matx_double_3_4_val_get, _LHBA._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_3_4_swiginit(self, _LHBA.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_3_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _LHBA: +_LHBA._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _LHBA._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _LHBA._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _LHBA._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _LHBA._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _LHBA._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _LHBA._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_4_3_rows + cols = _LHBA._Matx_float_4_3_cols + channels = _LHBA._Matx_float_4_3_channels + shortdim = _LHBA._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_4_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_4_3_t(self) + + def mul(self, a): + return _LHBA._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_4_3___call__(self, i, j) + val = property(_LHBA._Matx_float_4_3_val_get, _LHBA._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_4_3_swiginit(self, _LHBA.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_4_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _LHBA: +_LHBA._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _LHBA._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _LHBA._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _LHBA._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _LHBA._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _LHBA._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _LHBA._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_4_3_rows + cols = _LHBA._Matx_double_4_3_cols + channels = _LHBA._Matx_double_4_3_channels + shortdim = _LHBA._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_4_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_4_3_t(self) + + def mul(self, a): + return _LHBA._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_4_3___call__(self, i, j) + val = property(_LHBA._Matx_double_4_3_val_get, _LHBA._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_4_3_swiginit(self, _LHBA.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_4_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _LHBA: +_LHBA._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _LHBA._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _LHBA._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _LHBA._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _LHBA._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _LHBA._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _LHBA._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_4_4_rows + cols = _LHBA._Matx_float_4_4_cols + channels = _LHBA._Matx_float_4_4_channels + shortdim = _LHBA._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_4_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_4_4_t(self) + + def mul(self, a): + return _LHBA._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_4_4___call__(self, i, j) + val = property(_LHBA._Matx_float_4_4_val_get, _LHBA._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_4_4_swiginit(self, _LHBA.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_4_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _LHBA: +_LHBA._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _LHBA._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _LHBA._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _LHBA._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _LHBA._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _LHBA._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _LHBA._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_4_4_rows + cols = _LHBA._Matx_double_4_4_cols + channels = _LHBA._Matx_double_4_4_channels + shortdim = _LHBA._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_4_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_4_4_t(self) + + def mul(self, a): + return _LHBA._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_4_4___call__(self, i, j) + val = property(_LHBA._Matx_double_4_4_val_get, _LHBA._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_4_4_swiginit(self, _LHBA.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_4_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _LHBA: +_LHBA._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _LHBA._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _LHBA._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _LHBA._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _LHBA._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _LHBA._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _LHBA._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_6_6_rows + cols = _LHBA._Matx_float_6_6_cols + channels = _LHBA._Matx_float_6_6_channels + shortdim = _LHBA._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_6_6_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_6_6_t(self) + + def mul(self, a): + return _LHBA._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_6_6___call__(self, i, j) + val = property(_LHBA._Matx_float_6_6_val_get, _LHBA._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_6_6_swiginit(self, _LHBA.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_6_6___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _LHBA: +_LHBA._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _LHBA._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _LHBA._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _LHBA._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _LHBA._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _LHBA._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _LHBA._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_6_6_rows + cols = _LHBA._Matx_double_6_6_cols + channels = _LHBA._Matx_double_6_6_channels + shortdim = _LHBA._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_6_6_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_6_6_t(self) + + def mul(self, a): + return _LHBA._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_6_6___call__(self, i, j) + val = property(_LHBA._Matx_double_6_6_val_get, _LHBA._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_6_6_swiginit(self, _LHBA.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_6_6___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _LHBA: +_LHBA._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _LHBA._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _LHBA._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _LHBA._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _LHBA._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _LHBA._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _LHBA._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Point__int_swiginit(self, _LHBA.new__Point__int(*args)) + + def dot(self, pt): + return _LHBA._Point__int_dot(self, pt) + + def ddot(self, pt): + return _LHBA._Point__int_ddot(self, pt) + + def cross(self, pt): + return _LHBA._Point__int_cross(self, pt) + x = property(_LHBA._Point__int_x_get, _LHBA._Point__int_x_set) + y = property(_LHBA._Point__int_y_get, _LHBA._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _LHBA._Point__int___str__(self) + __swig_destroy__ = _LHBA.delete__Point__int + +# Register _Point__int in _LHBA: +_LHBA._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Point__float_swiginit(self, _LHBA.new__Point__float(*args)) + + def dot(self, pt): + return _LHBA._Point__float_dot(self, pt) + + def ddot(self, pt): + return _LHBA._Point__float_ddot(self, pt) + + def cross(self, pt): + return _LHBA._Point__float_cross(self, pt) + x = property(_LHBA._Point__float_x_get, _LHBA._Point__float_x_set) + y = property(_LHBA._Point__float_y_get, _LHBA._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _LHBA._Point__float___str__(self) + __swig_destroy__ = _LHBA.delete__Point__float + +# Register _Point__float in _LHBA: +_LHBA._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Point__double_swiginit(self, _LHBA.new__Point__double(*args)) + + def dot(self, pt): + return _LHBA._Point__double_dot(self, pt) + + def ddot(self, pt): + return _LHBA._Point__double_ddot(self, pt) + + def cross(self, pt): + return _LHBA._Point__double_cross(self, pt) + x = property(_LHBA._Point__double_x_get, _LHBA._Point__double_x_set) + y = property(_LHBA._Point__double_y_get, _LHBA._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _LHBA._Point__double___str__(self) + __swig_destroy__ = _LHBA.delete__Point__double + +# Register _Point__double in _LHBA: +_LHBA._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Rect__int_swiginit(self, _LHBA.new__Rect__int(*args)) + + def tl(self): + return _LHBA._Rect__int_tl(self) + + def br(self): + return _LHBA._Rect__int_br(self) + + def size(self): + return _LHBA._Rect__int_size(self) + + def area(self): + return _LHBA._Rect__int_area(self) + + def contains(self, pt): + return _LHBA._Rect__int_contains(self, pt) + x = property(_LHBA._Rect__int_x_get, _LHBA._Rect__int_x_set) + y = property(_LHBA._Rect__int_y_get, _LHBA._Rect__int_y_set) + width = property(_LHBA._Rect__int_width_get, _LHBA._Rect__int_width_set) + height = property(_LHBA._Rect__int_height_get, _LHBA._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _LHBA._Rect__int___str__(self) + __swig_destroy__ = _LHBA.delete__Rect__int + +# Register _Rect__int in _LHBA: +_LHBA._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Rect__float_swiginit(self, _LHBA.new__Rect__float(*args)) + + def tl(self): + return _LHBA._Rect__float_tl(self) + + def br(self): + return _LHBA._Rect__float_br(self) + + def size(self): + return _LHBA._Rect__float_size(self) + + def area(self): + return _LHBA._Rect__float_area(self) + + def contains(self, pt): + return _LHBA._Rect__float_contains(self, pt) + x = property(_LHBA._Rect__float_x_get, _LHBA._Rect__float_x_set) + y = property(_LHBA._Rect__float_y_get, _LHBA._Rect__float_y_set) + width = property(_LHBA._Rect__float_width_get, _LHBA._Rect__float_width_set) + height = property(_LHBA._Rect__float_height_get, _LHBA._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _LHBA._Rect__float___str__(self) + __swig_destroy__ = _LHBA.delete__Rect__float + +# Register _Rect__float in _LHBA: +_LHBA._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Rect__double_swiginit(self, _LHBA.new__Rect__double(*args)) + + def tl(self): + return _LHBA._Rect__double_tl(self) + + def br(self): + return _LHBA._Rect__double_br(self) + + def size(self): + return _LHBA._Rect__double_size(self) + + def area(self): + return _LHBA._Rect__double_area(self) + + def contains(self, pt): + return _LHBA._Rect__double_contains(self, pt) + x = property(_LHBA._Rect__double_x_get, _LHBA._Rect__double_x_set) + y = property(_LHBA._Rect__double_y_get, _LHBA._Rect__double_y_set) + width = property(_LHBA._Rect__double_width_get, _LHBA._Rect__double_width_set) + height = property(_LHBA._Rect__double_height_get, _LHBA._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _LHBA._Rect__double___str__(self) + __swig_destroy__ = _LHBA.delete__Rect__double + +# Register _Rect__double in _LHBA: +_LHBA._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Scalar__double_swiginit(self, _LHBA.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _LHBA._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _LHBA._Scalar__double_mul(self, a, scale) + + def conj(self): + return _LHBA._Scalar__double_conj(self) + + def isReal(self): + return _LHBA._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Scalar__double___str__(self) + __swig_destroy__ = _LHBA.delete__Scalar__double + +# Register _Scalar__double in _LHBA: +_LHBA._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _LHBA._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Size__int_swiginit(self, _LHBA.new__Size__int(*args)) + + def area(self): + return _LHBA._Size__int_area(self) + width = property(_LHBA._Size__int_width_get, _LHBA._Size__int_width_set) + height = property(_LHBA._Size__int_height_get, _LHBA._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _LHBA._Size__int___str__(self) + __swig_destroy__ = _LHBA.delete__Size__int + +# Register _Size__int in _LHBA: +_LHBA._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Size__float_swiginit(self, _LHBA.new__Size__float(*args)) + + def area(self): + return _LHBA._Size__float_area(self) + width = property(_LHBA._Size__float_width_get, _LHBA._Size__float_width_set) + height = property(_LHBA._Size__float_height_get, _LHBA._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _LHBA._Size__float___str__(self) + __swig_destroy__ = _LHBA.delete__Size__float + +# Register _Size__float in _LHBA: +_LHBA._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Size__double_swiginit(self, _LHBA.new__Size__double(*args)) + + def area(self): + return _LHBA._Size__double_area(self) + width = property(_LHBA._Size__double_width_get, _LHBA._Size__double_width_set) + height = property(_LHBA._Size__double_height_get, _LHBA._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _LHBA._Size__double___str__(self) + __swig_destroy__ = _LHBA.delete__Size__double + +# Register _Size__double in _LHBA: +_LHBA._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def LHBA(file1, file2, outfile): + return _LHBA.LHBA(file1, file2, outfile) + + diff --git a/plugins/unsupervised_method/scripts/OCD.py b/plugins/unsupervised_method/scripts/OCD.py new file mode 100644 index 0000000..22a6883 --- /dev/null +++ b/plugins/unsupervised_method/scripts/OCD.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _OCD +else: + import _OCD + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _OCD.CV_VERSION_MAJOR +CV_VERSION_MINOR = _OCD.CV_VERSION_MINOR +CV_VERSION_REVISION = _OCD.CV_VERSION_REVISION +CV_VERSION_STATUS = _OCD.CV_VERSION_STATUS +CV_VERSION = _OCD.CV_VERSION +CV_MAJOR_VERSION = _OCD.CV_MAJOR_VERSION +CV_MINOR_VERSION = _OCD.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _OCD.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_bool_generic_type + channels = _OCD.DataType_bool_channels + fmt = _OCD.DataType_bool_fmt + + def __init__(self): + _OCD.DataType_bool_swiginit(self, _OCD.new_DataType_bool()) + __swig_destroy__ = _OCD.delete_DataType_bool + +# Register DataType_bool in _OCD: +_OCD.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_uchar_generic_type + channels = _OCD.DataType_uchar_channels + fmt = _OCD.DataType_uchar_fmt + + def __init__(self): + _OCD.DataType_uchar_swiginit(self, _OCD.new_DataType_uchar()) + __swig_destroy__ = _OCD.delete_DataType_uchar + +# Register DataType_uchar in _OCD: +_OCD.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_schar_generic_type + channels = _OCD.DataType_schar_channels + fmt = _OCD.DataType_schar_fmt + + def __init__(self): + _OCD.DataType_schar_swiginit(self, _OCD.new_DataType_schar()) + __swig_destroy__ = _OCD.delete_DataType_schar + +# Register DataType_schar in _OCD: +_OCD.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_char_generic_type + channels = _OCD.DataType_char_channels + fmt = _OCD.DataType_char_fmt + + def __init__(self): + _OCD.DataType_char_swiginit(self, _OCD.new_DataType_char()) + __swig_destroy__ = _OCD.delete_DataType_char + +# Register DataType_char in _OCD: +_OCD.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_ushort_generic_type + channels = _OCD.DataType_ushort_channels + fmt = _OCD.DataType_ushort_fmt + + def __init__(self): + _OCD.DataType_ushort_swiginit(self, _OCD.new_DataType_ushort()) + __swig_destroy__ = _OCD.delete_DataType_ushort + +# Register DataType_ushort in _OCD: +_OCD.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_short_generic_type + channels = _OCD.DataType_short_channels + fmt = _OCD.DataType_short_fmt + + def __init__(self): + _OCD.DataType_short_swiginit(self, _OCD.new_DataType_short()) + __swig_destroy__ = _OCD.delete_DataType_short + +# Register DataType_short in _OCD: +_OCD.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_int_generic_type + channels = _OCD.DataType_int_channels + fmt = _OCD.DataType_int_fmt + + def __init__(self): + _OCD.DataType_int_swiginit(self, _OCD.new_DataType_int()) + __swig_destroy__ = _OCD.delete_DataType_int + +# Register DataType_int in _OCD: +_OCD.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_float_generic_type + channels = _OCD.DataType_float_channels + fmt = _OCD.DataType_float_fmt + + def __init__(self): + _OCD.DataType_float_swiginit(self, _OCD.new_DataType_float()) + __swig_destroy__ = _OCD.delete_DataType_float + +# Register DataType_float in _OCD: +_OCD.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_double_generic_type + channels = _OCD.DataType_double_channels + fmt = _OCD.DataType_double_fmt + + def __init__(self): + _OCD.DataType_double_swiginit(self, _OCD.new_DataType_double()) + __swig_destroy__ = _OCD.delete_DataType_double + +# Register DataType_double in _OCD: +_OCD.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD.Range_swiginit(self, _OCD.new_Range(*args)) + + def size(self): + return _OCD.Range_size(self) + + def empty(self): + return _OCD.Range_empty(self) + + @staticmethod + def all(): + return _OCD.Range_all() + start = property(_OCD.Range_start_get, _OCD.Range_start_set) + end = property(_OCD.Range_end_get, _OCD.Range_end_set) + __swig_destroy__ = _OCD.delete_Range + +# Register Range in _OCD: +_OCD.Range_swigregister(Range) + +def Range_all(): + return _OCD.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _OCD.delete_SwigPyIterator + + def value(self): + return _OCD.SwigPyIterator_value(self) + + def incr(self, n=1): + return _OCD.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _OCD.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _OCD.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _OCD.SwigPyIterator_equal(self, x) + + def copy(self): + return _OCD.SwigPyIterator_copy(self) + + def next(self): + return _OCD.SwigPyIterator_next(self) + + def __next__(self): + return _OCD.SwigPyIterator___next__(self) + + def previous(self): + return _OCD.SwigPyIterator_previous(self) + + def advance(self, n): + return _OCD.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _OCD.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _OCD.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _OCD.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _OCD.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _OCD.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _OCD.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _OCD: +_OCD.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_AddOp_swiginit(self, _OCD.new_Matx_AddOp()) + __swig_destroy__ = _OCD.delete_Matx_AddOp + +# Register Matx_AddOp in _OCD: +_OCD.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_SubOp_swiginit(self, _OCD.new_Matx_SubOp()) + __swig_destroy__ = _OCD.delete_Matx_SubOp + +# Register Matx_SubOp in _OCD: +_OCD.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_ScaleOp_swiginit(self, _OCD.new_Matx_ScaleOp()) + __swig_destroy__ = _OCD.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _OCD: +_OCD.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_MulOp_swiginit(self, _OCD.new_Matx_MulOp()) + __swig_destroy__ = _OCD.delete_Matx_MulOp + +# Register Matx_MulOp in _OCD: +_OCD.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_DivOp_swiginit(self, _OCD.new_Matx_DivOp()) + __swig_destroy__ = _OCD.delete_Matx_DivOp + +# Register Matx_DivOp in _OCD: +_OCD.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_MatMulOp_swiginit(self, _OCD.new_Matx_MatMulOp()) + __swig_destroy__ = _OCD.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _OCD: +_OCD.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_TOp_swiginit(self, _OCD.new_Matx_TOp()) + __swig_destroy__ = _OCD.delete_Matx_TOp + +# Register Matx_TOp in _OCD: +_OCD.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _OCD.delete_Mat + + def row(self, y): + return _OCD.Mat_row(self, y) + + def col(self, x): + return _OCD.Mat_col(self, x) + + def rowRange(self, *args): + return _OCD.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _OCD.Mat_colRange(self, *args) + + def diag(self, d=0): + return _OCD.Mat_diag(self, d) + + def clone(self): + return _OCD.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _OCD.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _OCD.Mat_reshape(self, *args) + + def create(self, *args): + return _OCD.Mat_create(self, *args) + + def addref(self): + return _OCD.Mat_addref(self) + + def release(self): + return _OCD.Mat_release(self) + + def deallocate(self): + return _OCD.Mat_deallocate(self) + + def copySize(self, m): + return _OCD.Mat_copySize(self, m) + + def reserve(self, sz): + return _OCD.Mat_reserve(self, sz) + + def resize(self, *args): + return _OCD.Mat_resize(self, *args) + + def push_back_(self, elem): + return _OCD.Mat_push_back_(self, elem) + + def push_back(self, m): + return _OCD.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _OCD.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _OCD.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD.Mat___call__(self, *args) + + def isContinuous(self): + return _OCD.Mat_isContinuous(self) + + def isSubmatrix(self): + return _OCD.Mat_isSubmatrix(self) + + def elemSize(self): + return _OCD.Mat_elemSize(self) + + def elemSize1(self): + return _OCD.Mat_elemSize1(self) + + def type(self): + return _OCD.Mat_type(self) + + def depth(self): + return _OCD.Mat_depth(self) + + def channels(self): + return _OCD.Mat_channels(self) + + def step1(self, i=0): + return _OCD.Mat_step1(self, i) + + def empty(self): + return _OCD.Mat_empty(self) + + def total(self): + return _OCD.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _OCD.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _OCD.Mat_ptr(self, *args) + MAGIC_VAL = _OCD.Mat_MAGIC_VAL + AUTO_STEP = _OCD.Mat_AUTO_STEP + CONTINUOUS_FLAG = _OCD.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _OCD.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _OCD.Mat_MAGIC_MASK + TYPE_MASK = _OCD.Mat_TYPE_MASK + DEPTH_MASK = _OCD.Mat_DEPTH_MASK + flags = property(_OCD.Mat_flags_get, _OCD.Mat_flags_set) + dims = property(_OCD.Mat_dims_get, _OCD.Mat_dims_set) + rows = property(_OCD.Mat_rows_get, _OCD.Mat_rows_set) + cols = property(_OCD.Mat_cols_get, _OCD.Mat_cols_set) + data = property(_OCD.Mat_data_get, _OCD.Mat_data_set) + datastart = property(_OCD.Mat_datastart_get, _OCD.Mat_datastart_set) + dataend = property(_OCD.Mat_dataend_get, _OCD.Mat_dataend_set) + datalimit = property(_OCD.Mat_datalimit_get, _OCD.Mat_datalimit_set) + + def __init__(self, *args): + _OCD.Mat_swiginit(self, _OCD.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD.Mat___str__(self) + +# Register Mat in _OCD: +_OCD.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _OCD._cv_numpy_sizeof_uint8_t_swiginit(self, _OCD.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _OCD: +_OCD._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _OCD.uint8_tArray___bool__(self) + + def __len__(self): + return _OCD.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _OCD.uint8_tArray_pop(self) + + def append(self, x): + return _OCD.uint8_tArray_append(self, x) + + def empty(self): + return _OCD.uint8_tArray_empty(self) + + def size(self): + return _OCD.uint8_tArray_size(self) + + def swap(self, v): + return _OCD.uint8_tArray_swap(self, v) + + def begin(self): + return _OCD.uint8_tArray_begin(self) + + def end(self): + return _OCD.uint8_tArray_end(self) + + def rbegin(self): + return _OCD.uint8_tArray_rbegin(self) + + def rend(self): + return _OCD.uint8_tArray_rend(self) + + def clear(self): + return _OCD.uint8_tArray_clear(self) + + def get_allocator(self): + return _OCD.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _OCD.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _OCD.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _OCD.uint8_tArray_swiginit(self, _OCD.new_uint8_tArray(*args)) + + def push_back(self, x): + return _OCD.uint8_tArray_push_back(self, x) + + def front(self): + return _OCD.uint8_tArray_front(self) + + def back(self): + return _OCD.uint8_tArray_back(self) + + def assign(self, n, x): + return _OCD.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _OCD.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _OCD.uint8_tArray_reserve(self, n) + + def capacity(self): + return _OCD.uint8_tArray_capacity(self) + __swig_destroy__ = _OCD.delete_uint8_tArray + +# Register uint8_tArray in _OCD: +_OCD.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_uint8_t_2_1_rows + cols = _OCD._Matx_uint8_t_2_1_cols + channels = _OCD._Matx_uint8_t_2_1_channels + shortdim = _OCD._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_OCD._Matx_uint8_t_2_1_val_get, _OCD._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_uint8_t_2_1_swiginit(self, _OCD.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _OCD: +_OCD._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _OCD._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _OCD._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _OCD._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _OCD._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _OCD._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _OCD._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_uint8_t_2_swiginit(self, _OCD.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _OCD: +_OCD._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _OCD._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_uint8_t_2_generic_type + channels = _OCD._DataType_Vec_uint8_t_2_channels + fmt = _OCD._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _OCD._DataType_Vec_uint8_t_2_swiginit(self, _OCD.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _OCD: +_OCD._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_uint8_t_3_1_rows + cols = _OCD._Matx_uint8_t_3_1_cols + channels = _OCD._Matx_uint8_t_3_1_channels + shortdim = _OCD._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_OCD._Matx_uint8_t_3_1_val_get, _OCD._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_uint8_t_3_1_swiginit(self, _OCD.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _OCD: +_OCD._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _OCD._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _OCD._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _OCD._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _OCD._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _OCD._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _OCD._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_uint8_t_3_swiginit(self, _OCD.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _OCD: +_OCD._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _OCD._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_uint8_t_3_generic_type + channels = _OCD._DataType_Vec_uint8_t_3_channels + fmt = _OCD._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _OCD._DataType_Vec_uint8_t_3_swiginit(self, _OCD.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _OCD: +_OCD._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_uint8_t_4_1_rows + cols = _OCD._Matx_uint8_t_4_1_cols + channels = _OCD._Matx_uint8_t_4_1_channels + shortdim = _OCD._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_OCD._Matx_uint8_t_4_1_val_get, _OCD._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_uint8_t_4_1_swiginit(self, _OCD.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _OCD: +_OCD._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _OCD._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _OCD._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _OCD._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _OCD._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _OCD._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _OCD._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_uint8_t_4_swiginit(self, _OCD.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _OCD: +_OCD._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _OCD._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_uint8_t_4_generic_type + channels = _OCD._DataType_Vec_uint8_t_4_channels + fmt = _OCD._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _OCD._DataType_Vec_uint8_t_4_swiginit(self, _OCD.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _OCD: +_OCD._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_short_value + + def __init__(self): + _OCD._cv_numpy_sizeof_short_swiginit(self, _OCD.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _OCD: +_OCD._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.shortArray___nonzero__(self) + + def __bool__(self): + return _OCD.shortArray___bool__(self) + + def __len__(self): + return _OCD.shortArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.shortArray___setitem__(self, *args) + + def pop(self): + return _OCD.shortArray_pop(self) + + def append(self, x): + return _OCD.shortArray_append(self, x) + + def empty(self): + return _OCD.shortArray_empty(self) + + def size(self): + return _OCD.shortArray_size(self) + + def swap(self, v): + return _OCD.shortArray_swap(self, v) + + def begin(self): + return _OCD.shortArray_begin(self) + + def end(self): + return _OCD.shortArray_end(self) + + def rbegin(self): + return _OCD.shortArray_rbegin(self) + + def rend(self): + return _OCD.shortArray_rend(self) + + def clear(self): + return _OCD.shortArray_clear(self) + + def get_allocator(self): + return _OCD.shortArray_get_allocator(self) + + def pop_back(self): + return _OCD.shortArray_pop_back(self) + + def erase(self, *args): + return _OCD.shortArray_erase(self, *args) + + def __init__(self, *args): + _OCD.shortArray_swiginit(self, _OCD.new_shortArray(*args)) + + def push_back(self, x): + return _OCD.shortArray_push_back(self, x) + + def front(self): + return _OCD.shortArray_front(self) + + def back(self): + return _OCD.shortArray_back(self) + + def assign(self, n, x): + return _OCD.shortArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.shortArray_resize(self, *args) + + def insert(self, *args): + return _OCD.shortArray_insert(self, *args) + + def reserve(self, n): + return _OCD.shortArray_reserve(self, n) + + def capacity(self): + return _OCD.shortArray_capacity(self) + __swig_destroy__ = _OCD.delete_shortArray + +# Register shortArray in _OCD: +_OCD.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_short_2_1_rows + cols = _OCD._Matx_short_2_1_cols + channels = _OCD._Matx_short_2_1_channels + shortdim = _OCD._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_short_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_short_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_short_2_1___call__(self, i, j) + val = property(_OCD._Matx_short_2_1_val_get, _OCD._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_short_2_1_swiginit(self, _OCD.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_short_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _OCD: +_OCD._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _OCD._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _OCD._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _OCD._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _OCD._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _OCD._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _OCD._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_short_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_short_2_swiginit(self, _OCD.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_short_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_short_2 + +# Register _Vec_short_2 in _OCD: +_OCD._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _OCD._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_short_2_generic_type + channels = _OCD._DataType_Vec_short_2_channels + fmt = _OCD._DataType_Vec_short_2_fmt + + def __init__(self): + _OCD._DataType_Vec_short_2_swiginit(self, _OCD.new__DataType_Vec_short_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _OCD: +_OCD._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_short_3_1_rows + cols = _OCD._Matx_short_3_1_cols + channels = _OCD._Matx_short_3_1_channels + shortdim = _OCD._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_short_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_short_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_short_3_1___call__(self, i, j) + val = property(_OCD._Matx_short_3_1_val_get, _OCD._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_short_3_1_swiginit(self, _OCD.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_short_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _OCD: +_OCD._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _OCD._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _OCD._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _OCD._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _OCD._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _OCD._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _OCD._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_short_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_short_3_swiginit(self, _OCD.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_short_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_short_3 + +# Register _Vec_short_3 in _OCD: +_OCD._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _OCD._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_short_3_generic_type + channels = _OCD._DataType_Vec_short_3_channels + fmt = _OCD._DataType_Vec_short_3_fmt + + def __init__(self): + _OCD._DataType_Vec_short_3_swiginit(self, _OCD.new__DataType_Vec_short_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _OCD: +_OCD._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_short_4_1_rows + cols = _OCD._Matx_short_4_1_cols + channels = _OCD._Matx_short_4_1_channels + shortdim = _OCD._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_short_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_short_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_short_4_1___call__(self, i, j) + val = property(_OCD._Matx_short_4_1_val_get, _OCD._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_short_4_1_swiginit(self, _OCD.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_short_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _OCD: +_OCD._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _OCD._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _OCD._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _OCD._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _OCD._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _OCD._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _OCD._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_short_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_short_4_swiginit(self, _OCD.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_short_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_short_4 + +# Register _Vec_short_4 in _OCD: +_OCD._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _OCD._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_short_4_generic_type + channels = _OCD._DataType_Vec_short_4_channels + fmt = _OCD._DataType_Vec_short_4_fmt + + def __init__(self): + _OCD._DataType_Vec_short_4_swiginit(self, _OCD.new__DataType_Vec_short_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _OCD: +_OCD._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_ushort_value + + def __init__(self): + _OCD._cv_numpy_sizeof_ushort_swiginit(self, _OCD.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _OCD: +_OCD._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.ushortArray___nonzero__(self) + + def __bool__(self): + return _OCD.ushortArray___bool__(self) + + def __len__(self): + return _OCD.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.ushortArray___setitem__(self, *args) + + def pop(self): + return _OCD.ushortArray_pop(self) + + def append(self, x): + return _OCD.ushortArray_append(self, x) + + def empty(self): + return _OCD.ushortArray_empty(self) + + def size(self): + return _OCD.ushortArray_size(self) + + def swap(self, v): + return _OCD.ushortArray_swap(self, v) + + def begin(self): + return _OCD.ushortArray_begin(self) + + def end(self): + return _OCD.ushortArray_end(self) + + def rbegin(self): + return _OCD.ushortArray_rbegin(self) + + def rend(self): + return _OCD.ushortArray_rend(self) + + def clear(self): + return _OCD.ushortArray_clear(self) + + def get_allocator(self): + return _OCD.ushortArray_get_allocator(self) + + def pop_back(self): + return _OCD.ushortArray_pop_back(self) + + def erase(self, *args): + return _OCD.ushortArray_erase(self, *args) + + def __init__(self, *args): + _OCD.ushortArray_swiginit(self, _OCD.new_ushortArray(*args)) + + def push_back(self, x): + return _OCD.ushortArray_push_back(self, x) + + def front(self): + return _OCD.ushortArray_front(self) + + def back(self): + return _OCD.ushortArray_back(self) + + def assign(self, n, x): + return _OCD.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.ushortArray_resize(self, *args) + + def insert(self, *args): + return _OCD.ushortArray_insert(self, *args) + + def reserve(self, n): + return _OCD.ushortArray_reserve(self, n) + + def capacity(self): + return _OCD.ushortArray_capacity(self) + __swig_destroy__ = _OCD.delete_ushortArray + +# Register ushortArray in _OCD: +_OCD.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_ushort_2_1_rows + cols = _OCD._Matx_ushort_2_1_cols + channels = _OCD._Matx_ushort_2_1_channels + shortdim = _OCD._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_ushort_2_1___call__(self, i, j) + val = property(_OCD._Matx_ushort_2_1_val_get, _OCD._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_ushort_2_1_swiginit(self, _OCD.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _OCD: +_OCD._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _OCD._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _OCD._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _OCD._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _OCD._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _OCD._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _OCD._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_ushort_2_swiginit(self, _OCD.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_ushort_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _OCD: +_OCD._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _OCD._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_ushort_2_generic_type + channels = _OCD._DataType_Vec_ushort_2_channels + fmt = _OCD._DataType_Vec_ushort_2_fmt + + def __init__(self): + _OCD._DataType_Vec_ushort_2_swiginit(self, _OCD.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _OCD: +_OCD._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_ushort_3_1_rows + cols = _OCD._Matx_ushort_3_1_cols + channels = _OCD._Matx_ushort_3_1_channels + shortdim = _OCD._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_ushort_3_1___call__(self, i, j) + val = property(_OCD._Matx_ushort_3_1_val_get, _OCD._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_ushort_3_1_swiginit(self, _OCD.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _OCD: +_OCD._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _OCD._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _OCD._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _OCD._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _OCD._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _OCD._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _OCD._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_ushort_3_swiginit(self, _OCD.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_ushort_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _OCD: +_OCD._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _OCD._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_ushort_3_generic_type + channels = _OCD._DataType_Vec_ushort_3_channels + fmt = _OCD._DataType_Vec_ushort_3_fmt + + def __init__(self): + _OCD._DataType_Vec_ushort_3_swiginit(self, _OCD.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _OCD: +_OCD._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_ushort_4_1_rows + cols = _OCD._Matx_ushort_4_1_cols + channels = _OCD._Matx_ushort_4_1_channels + shortdim = _OCD._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_ushort_4_1___call__(self, i, j) + val = property(_OCD._Matx_ushort_4_1_val_get, _OCD._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_ushort_4_1_swiginit(self, _OCD.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _OCD: +_OCD._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _OCD._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _OCD._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _OCD._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _OCD._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _OCD._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _OCD._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_ushort_4_swiginit(self, _OCD.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_ushort_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _OCD: +_OCD._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _OCD._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_ushort_4_generic_type + channels = _OCD._DataType_Vec_ushort_4_channels + fmt = _OCD._DataType_Vec_ushort_4_fmt + + def __init__(self): + _OCD._DataType_Vec_ushort_4_swiginit(self, _OCD.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _OCD: +_OCD._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_int_value + + def __init__(self): + _OCD._cv_numpy_sizeof_int_swiginit(self, _OCD.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _OCD: +_OCD._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.intArray___nonzero__(self) + + def __bool__(self): + return _OCD.intArray___bool__(self) + + def __len__(self): + return _OCD.intArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.intArray___setitem__(self, *args) + + def pop(self): + return _OCD.intArray_pop(self) + + def append(self, x): + return _OCD.intArray_append(self, x) + + def empty(self): + return _OCD.intArray_empty(self) + + def size(self): + return _OCD.intArray_size(self) + + def swap(self, v): + return _OCD.intArray_swap(self, v) + + def begin(self): + return _OCD.intArray_begin(self) + + def end(self): + return _OCD.intArray_end(self) + + def rbegin(self): + return _OCD.intArray_rbegin(self) + + def rend(self): + return _OCD.intArray_rend(self) + + def clear(self): + return _OCD.intArray_clear(self) + + def get_allocator(self): + return _OCD.intArray_get_allocator(self) + + def pop_back(self): + return _OCD.intArray_pop_back(self) + + def erase(self, *args): + return _OCD.intArray_erase(self, *args) + + def __init__(self, *args): + _OCD.intArray_swiginit(self, _OCD.new_intArray(*args)) + + def push_back(self, x): + return _OCD.intArray_push_back(self, x) + + def front(self): + return _OCD.intArray_front(self) + + def back(self): + return _OCD.intArray_back(self) + + def assign(self, n, x): + return _OCD.intArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.intArray_resize(self, *args) + + def insert(self, *args): + return _OCD.intArray_insert(self, *args) + + def reserve(self, n): + return _OCD.intArray_reserve(self, n) + + def capacity(self): + return _OCD.intArray_capacity(self) + __swig_destroy__ = _OCD.delete_intArray + +# Register intArray in _OCD: +_OCD.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_2_1_rows + cols = _OCD._Matx_int_2_1_cols + channels = _OCD._Matx_int_2_1_channels + shortdim = _OCD._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_2_1___call__(self, i, j) + val = property(_OCD._Matx_int_2_1_val_get, _OCD._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_2_1_swiginit(self, _OCD.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _OCD: +_OCD._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _OCD._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _OCD._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _OCD._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _OCD._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _OCD._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _OCD._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_2_swiginit(self, _OCD.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_2 + +# Register _Vec_int_2 in _OCD: +_OCD._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _OCD._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_2_generic_type + channels = _OCD._DataType_Vec_int_2_channels + fmt = _OCD._DataType_Vec_int_2_fmt + + def __init__(self): + _OCD._DataType_Vec_int_2_swiginit(self, _OCD.new__DataType_Vec_int_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _OCD: +_OCD._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_3_1_rows + cols = _OCD._Matx_int_3_1_cols + channels = _OCD._Matx_int_3_1_channels + shortdim = _OCD._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_3_1___call__(self, i, j) + val = property(_OCD._Matx_int_3_1_val_get, _OCD._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_3_1_swiginit(self, _OCD.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _OCD: +_OCD._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _OCD._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _OCD._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _OCD._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _OCD._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _OCD._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _OCD._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_3_swiginit(self, _OCD.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_3 + +# Register _Vec_int_3 in _OCD: +_OCD._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _OCD._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_3_generic_type + channels = _OCD._DataType_Vec_int_3_channels + fmt = _OCD._DataType_Vec_int_3_fmt + + def __init__(self): + _OCD._DataType_Vec_int_3_swiginit(self, _OCD.new__DataType_Vec_int_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _OCD: +_OCD._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_4_1_rows + cols = _OCD._Matx_int_4_1_cols + channels = _OCD._Matx_int_4_1_channels + shortdim = _OCD._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_4_1___call__(self, i, j) + val = property(_OCD._Matx_int_4_1_val_get, _OCD._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_4_1_swiginit(self, _OCD.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _OCD: +_OCD._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _OCD._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _OCD._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _OCD._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _OCD._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _OCD._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _OCD._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_4_swiginit(self, _OCD.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_4 + +# Register _Vec_int_4 in _OCD: +_OCD._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _OCD._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_4_generic_type + channels = _OCD._DataType_Vec_int_4_channels + fmt = _OCD._DataType_Vec_int_4_fmt + + def __init__(self): + _OCD._DataType_Vec_int_4_swiginit(self, _OCD.new__DataType_Vec_int_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _OCD: +_OCD._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_6_1_rows + cols = _OCD._Matx_int_6_1_cols + channels = _OCD._Matx_int_6_1_channels + shortdim = _OCD._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_6_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_6_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_6_1___call__(self, i, j) + val = property(_OCD._Matx_int_6_1_val_get, _OCD._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_6_1_swiginit(self, _OCD.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_6_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _OCD: +_OCD._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _OCD._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _OCD._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _OCD._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _OCD._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _OCD._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _OCD._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_6_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_6_swiginit(self, _OCD.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_6___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_6 + +# Register _Vec_int_6 in _OCD: +_OCD._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _OCD._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_6_generic_type + channels = _OCD._DataType_Vec_int_6_channels + fmt = _OCD._DataType_Vec_int_6_fmt + + def __init__(self): + _OCD._DataType_Vec_int_6_swiginit(self, _OCD.new__DataType_Vec_int_6()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _OCD: +_OCD._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_8_1_rows + cols = _OCD._Matx_int_8_1_cols + channels = _OCD._Matx_int_8_1_channels + shortdim = _OCD._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_8_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_8_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_8_1___call__(self, i, j) + val = property(_OCD._Matx_int_8_1_val_get, _OCD._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_8_1_swiginit(self, _OCD.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_8_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _OCD: +_OCD._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _OCD._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _OCD._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _OCD._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _OCD._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _OCD._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _OCD._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_8_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_8_swiginit(self, _OCD.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_8___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_8 + +# Register _Vec_int_8 in _OCD: +_OCD._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _OCD._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_8_generic_type + channels = _OCD._DataType_Vec_int_8_channels + fmt = _OCD._DataType_Vec_int_8_fmt + + def __init__(self): + _OCD._DataType_Vec_int_8_swiginit(self, _OCD.new__DataType_Vec_int_8()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _OCD: +_OCD._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_float_value + + def __init__(self): + _OCD._cv_numpy_sizeof_float_swiginit(self, _OCD.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _OCD: +_OCD._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.floatArray___nonzero__(self) + + def __bool__(self): + return _OCD.floatArray___bool__(self) + + def __len__(self): + return _OCD.floatArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.floatArray___setitem__(self, *args) + + def pop(self): + return _OCD.floatArray_pop(self) + + def append(self, x): + return _OCD.floatArray_append(self, x) + + def empty(self): + return _OCD.floatArray_empty(self) + + def size(self): + return _OCD.floatArray_size(self) + + def swap(self, v): + return _OCD.floatArray_swap(self, v) + + def begin(self): + return _OCD.floatArray_begin(self) + + def end(self): + return _OCD.floatArray_end(self) + + def rbegin(self): + return _OCD.floatArray_rbegin(self) + + def rend(self): + return _OCD.floatArray_rend(self) + + def clear(self): + return _OCD.floatArray_clear(self) + + def get_allocator(self): + return _OCD.floatArray_get_allocator(self) + + def pop_back(self): + return _OCD.floatArray_pop_back(self) + + def erase(self, *args): + return _OCD.floatArray_erase(self, *args) + + def __init__(self, *args): + _OCD.floatArray_swiginit(self, _OCD.new_floatArray(*args)) + + def push_back(self, x): + return _OCD.floatArray_push_back(self, x) + + def front(self): + return _OCD.floatArray_front(self) + + def back(self): + return _OCD.floatArray_back(self) + + def assign(self, n, x): + return _OCD.floatArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.floatArray_resize(self, *args) + + def insert(self, *args): + return _OCD.floatArray_insert(self, *args) + + def reserve(self, n): + return _OCD.floatArray_reserve(self, n) + + def capacity(self): + return _OCD.floatArray_capacity(self) + __swig_destroy__ = _OCD.delete_floatArray + +# Register floatArray in _OCD: +_OCD.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_2_1_rows + cols = _OCD._Matx_float_2_1_cols + channels = _OCD._Matx_float_2_1_channels + shortdim = _OCD._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_float_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_2_1___call__(self, i, j) + val = property(_OCD._Matx_float_2_1_val_get, _OCD._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_2_1_swiginit(self, _OCD.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _OCD: +_OCD._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _OCD._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _OCD._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _OCD._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _OCD._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _OCD._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _OCD._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_float_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_float_2_swiginit(self, _OCD.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_float_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_float_2 + +# Register _Vec_float_2 in _OCD: +_OCD._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _OCD._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_float_2_generic_type + channels = _OCD._DataType_Vec_float_2_channels + fmt = _OCD._DataType_Vec_float_2_fmt + + def __init__(self): + _OCD._DataType_Vec_float_2_swiginit(self, _OCD.new__DataType_Vec_float_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _OCD: +_OCD._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_3_1_rows + cols = _OCD._Matx_float_3_1_cols + channels = _OCD._Matx_float_3_1_channels + shortdim = _OCD._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_float_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_3_1___call__(self, i, j) + val = property(_OCD._Matx_float_3_1_val_get, _OCD._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_3_1_swiginit(self, _OCD.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _OCD: +_OCD._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _OCD._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _OCD._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _OCD._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _OCD._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _OCD._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _OCD._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_float_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_float_3_swiginit(self, _OCD.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_float_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_float_3 + +# Register _Vec_float_3 in _OCD: +_OCD._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _OCD._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_float_3_generic_type + channels = _OCD._DataType_Vec_float_3_channels + fmt = _OCD._DataType_Vec_float_3_fmt + + def __init__(self): + _OCD._DataType_Vec_float_3_swiginit(self, _OCD.new__DataType_Vec_float_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _OCD: +_OCD._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_4_1_rows + cols = _OCD._Matx_float_4_1_cols + channels = _OCD._Matx_float_4_1_channels + shortdim = _OCD._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_float_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_4_1___call__(self, i, j) + val = property(_OCD._Matx_float_4_1_val_get, _OCD._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_4_1_swiginit(self, _OCD.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _OCD: +_OCD._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _OCD._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _OCD._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _OCD._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _OCD._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _OCD._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _OCD._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_float_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_float_4_swiginit(self, _OCD.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_float_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_float_4 + +# Register _Vec_float_4 in _OCD: +_OCD._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _OCD._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_float_4_generic_type + channels = _OCD._DataType_Vec_float_4_channels + fmt = _OCD._DataType_Vec_float_4_fmt + + def __init__(self): + _OCD._DataType_Vec_float_4_swiginit(self, _OCD.new__DataType_Vec_float_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _OCD: +_OCD._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_6_1_rows + cols = _OCD._Matx_float_6_1_cols + channels = _OCD._Matx_float_6_1_channels + shortdim = _OCD._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_6_1_ddot(self, v) + + def t(self): + return _OCD._Matx_float_6_1_t(self) + + def mul(self, a): + return _OCD._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_6_1___call__(self, i, j) + val = property(_OCD._Matx_float_6_1_val_get, _OCD._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_6_1_swiginit(self, _OCD.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_6_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _OCD: +_OCD._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _OCD._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _OCD._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _OCD._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _OCD._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _OCD._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _OCD._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_float_6_all(alpha) + + def mul(self, v): + return _OCD._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_float_6_swiginit(self, _OCD.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_float_6___str__(self) + __swig_destroy__ = _OCD.delete__Vec_float_6 + +# Register _Vec_float_6 in _OCD: +_OCD._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _OCD._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_float_6_generic_type + channels = _OCD._DataType_Vec_float_6_channels + fmt = _OCD._DataType_Vec_float_6_fmt + + def __init__(self): + _OCD._DataType_Vec_float_6_swiginit(self, _OCD.new__DataType_Vec_float_6()) + __swig_destroy__ = _OCD.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _OCD: +_OCD._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_double_value + + def __init__(self): + _OCD._cv_numpy_sizeof_double_swiginit(self, _OCD.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _OCD: +_OCD._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.doubleArray___nonzero__(self) + + def __bool__(self): + return _OCD.doubleArray___bool__(self) + + def __len__(self): + return _OCD.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.doubleArray___setitem__(self, *args) + + def pop(self): + return _OCD.doubleArray_pop(self) + + def append(self, x): + return _OCD.doubleArray_append(self, x) + + def empty(self): + return _OCD.doubleArray_empty(self) + + def size(self): + return _OCD.doubleArray_size(self) + + def swap(self, v): + return _OCD.doubleArray_swap(self, v) + + def begin(self): + return _OCD.doubleArray_begin(self) + + def end(self): + return _OCD.doubleArray_end(self) + + def rbegin(self): + return _OCD.doubleArray_rbegin(self) + + def rend(self): + return _OCD.doubleArray_rend(self) + + def clear(self): + return _OCD.doubleArray_clear(self) + + def get_allocator(self): + return _OCD.doubleArray_get_allocator(self) + + def pop_back(self): + return _OCD.doubleArray_pop_back(self) + + def erase(self, *args): + return _OCD.doubleArray_erase(self, *args) + + def __init__(self, *args): + _OCD.doubleArray_swiginit(self, _OCD.new_doubleArray(*args)) + + def push_back(self, x): + return _OCD.doubleArray_push_back(self, x) + + def front(self): + return _OCD.doubleArray_front(self) + + def back(self): + return _OCD.doubleArray_back(self) + + def assign(self, n, x): + return _OCD.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.doubleArray_resize(self, *args) + + def insert(self, *args): + return _OCD.doubleArray_insert(self, *args) + + def reserve(self, n): + return _OCD.doubleArray_reserve(self, n) + + def capacity(self): + return _OCD.doubleArray_capacity(self) + __swig_destroy__ = _OCD.delete_doubleArray + +# Register doubleArray in _OCD: +_OCD.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_2_1_rows + cols = _OCD._Matx_double_2_1_cols + channels = _OCD._Matx_double_2_1_channels + shortdim = _OCD._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_double_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_2_1___call__(self, i, j) + val = property(_OCD._Matx_double_2_1_val_get, _OCD._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_2_1_swiginit(self, _OCD.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _OCD: +_OCD._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _OCD._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _OCD._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _OCD._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _OCD._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _OCD._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _OCD._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_double_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_double_2_swiginit(self, _OCD.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_double_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_double_2 + +# Register _Vec_double_2 in _OCD: +_OCD._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _OCD._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_double_2_generic_type + channels = _OCD._DataType_Vec_double_2_channels + fmt = _OCD._DataType_Vec_double_2_fmt + + def __init__(self): + _OCD._DataType_Vec_double_2_swiginit(self, _OCD.new__DataType_Vec_double_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _OCD: +_OCD._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_3_1_rows + cols = _OCD._Matx_double_3_1_cols + channels = _OCD._Matx_double_3_1_channels + shortdim = _OCD._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_double_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_3_1___call__(self, i, j) + val = property(_OCD._Matx_double_3_1_val_get, _OCD._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_3_1_swiginit(self, _OCD.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _OCD: +_OCD._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _OCD._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _OCD._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _OCD._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _OCD._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _OCD._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _OCD._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_double_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_double_3_swiginit(self, _OCD.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_double_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_double_3 + +# Register _Vec_double_3 in _OCD: +_OCD._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _OCD._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_double_3_generic_type + channels = _OCD._DataType_Vec_double_3_channels + fmt = _OCD._DataType_Vec_double_3_fmt + + def __init__(self): + _OCD._DataType_Vec_double_3_swiginit(self, _OCD.new__DataType_Vec_double_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _OCD: +_OCD._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_4_1_rows + cols = _OCD._Matx_double_4_1_cols + channels = _OCD._Matx_double_4_1_channels + shortdim = _OCD._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_double_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_4_1___call__(self, i, j) + val = property(_OCD._Matx_double_4_1_val_get, _OCD._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_4_1_swiginit(self, _OCD.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _OCD: +_OCD._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _OCD._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _OCD._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _OCD._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _OCD._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _OCD._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _OCD._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_double_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_double_4_swiginit(self, _OCD.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_double_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_double_4 + +# Register _Vec_double_4 in _OCD: +_OCD._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _OCD._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_double_4_generic_type + channels = _OCD._DataType_Vec_double_4_channels + fmt = _OCD._DataType_Vec_double_4_fmt + + def __init__(self): + _OCD._DataType_Vec_double_4_swiginit(self, _OCD.new__DataType_Vec_double_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _OCD: +_OCD._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_6_1_rows + cols = _OCD._Matx_double_6_1_cols + channels = _OCD._Matx_double_6_1_channels + shortdim = _OCD._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_6_1_ddot(self, v) + + def t(self): + return _OCD._Matx_double_6_1_t(self) + + def mul(self, a): + return _OCD._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_6_1___call__(self, i, j) + val = property(_OCD._Matx_double_6_1_val_get, _OCD._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_6_1_swiginit(self, _OCD.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_6_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _OCD: +_OCD._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _OCD._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _OCD._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _OCD._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _OCD._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _OCD._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _OCD._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_double_6_all(alpha) + + def mul(self, v): + return _OCD._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_double_6_swiginit(self, _OCD.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_double_6___str__(self) + __swig_destroy__ = _OCD.delete__Vec_double_6 + +# Register _Vec_double_6 in _OCD: +_OCD._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _OCD._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_double_6_generic_type + channels = _OCD._DataType_Vec_double_6_channels + fmt = _OCD._DataType_Vec_double_6_fmt + + def __init__(self): + _OCD._DataType_Vec_double_6_swiginit(self, _OCD.new__DataType_Vec_double_6()) + __swig_destroy__ = _OCD.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _OCD: +_OCD._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD._mat__np_array_constructor_swiginit(self, _OCD.new__mat__np_array_constructor()) + __swig_destroy__ = _OCD.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _OCD: +_OCD._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _OCD._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _OCD._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_uchar_value + + def __init__(self): + _OCD._cv_numpy_sizeof_uchar_swiginit(self, _OCD.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _OCD: +_OCD._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__uchar_create(self, *args) + + def cross(self, m): + return _OCD._Mat__uchar_cross(self, m) + + def row(self, y): + return _OCD._Mat__uchar_row(self, y) + + def col(self, x): + return _OCD._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__uchar_diag(self, d) + + def clone(self): + return _OCD._Mat__uchar_clone(self) + + def elemSize(self): + return _OCD._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__uchar_elemSize1(self) + + def type(self): + return _OCD._Mat__uchar_type(self) + + def depth(self): + return _OCD._Mat__uchar_depth(self) + + def channels(self): + return _OCD._Mat__uchar_channels(self) + + def step1(self, i=0): + return _OCD._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__uchar_swiginit(self, _OCD.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__uchar___str__(self) + __swig_destroy__ = _OCD.delete__Mat__uchar + +# Register _Mat__uchar in _OCD: +_OCD._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2b_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _OCD: +_OCD._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2b_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2b_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2b_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2b_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2b_type(self) + + def depth(self): + return _OCD._Mat__Vec2b_depth(self) + + def channels(self): + return _OCD._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2b_swiginit(self, _OCD.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2b___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _OCD: +_OCD._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3b_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _OCD: +_OCD._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3b_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3b_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3b_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3b_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3b_type(self) + + def depth(self): + return _OCD._Mat__Vec3b_depth(self) + + def channels(self): + return _OCD._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3b_swiginit(self, _OCD.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3b___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _OCD: +_OCD._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4b_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _OCD: +_OCD._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4b_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4b_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4b_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4b_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4b_type(self) + + def depth(self): + return _OCD._Mat__Vec4b_depth(self) + + def channels(self): + return _OCD._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4b_swiginit(self, _OCD.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4b___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _OCD: +_OCD._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__short_create(self, *args) + + def cross(self, m): + return _OCD._Mat__short_cross(self, m) + + def row(self, y): + return _OCD._Mat__short_row(self, y) + + def col(self, x): + return _OCD._Mat__short_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__short_diag(self, d) + + def clone(self): + return _OCD._Mat__short_clone(self) + + def elemSize(self): + return _OCD._Mat__short_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__short_elemSize1(self) + + def type(self): + return _OCD._Mat__short_type(self) + + def depth(self): + return _OCD._Mat__short_depth(self) + + def channels(self): + return _OCD._Mat__short_channels(self) + + def step1(self, i=0): + return _OCD._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__short___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__short_swiginit(self, _OCD.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__short___str__(self) + __swig_destroy__ = _OCD.delete__Mat__short + +# Register _Mat__short in _OCD: +_OCD._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2s_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _OCD: +_OCD._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2s_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2s_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2s_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2s_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2s_type(self) + + def depth(self): + return _OCD._Mat__Vec2s_depth(self) + + def channels(self): + return _OCD._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2s_swiginit(self, _OCD.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2s___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _OCD: +_OCD._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3s_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _OCD: +_OCD._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3s_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3s_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3s_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3s_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3s_type(self) + + def depth(self): + return _OCD._Mat__Vec3s_depth(self) + + def channels(self): + return _OCD._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3s_swiginit(self, _OCD.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3s___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _OCD: +_OCD._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4s_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _OCD: +_OCD._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4s_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4s_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4s_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4s_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4s_type(self) + + def depth(self): + return _OCD._Mat__Vec4s_depth(self) + + def channels(self): + return _OCD._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4s_swiginit(self, _OCD.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4s___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _OCD: +_OCD._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__ushort_create(self, *args) + + def cross(self, m): + return _OCD._Mat__ushort_cross(self, m) + + def row(self, y): + return _OCD._Mat__ushort_row(self, y) + + def col(self, x): + return _OCD._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__ushort_diag(self, d) + + def clone(self): + return _OCD._Mat__ushort_clone(self) + + def elemSize(self): + return _OCD._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__ushort_elemSize1(self) + + def type(self): + return _OCD._Mat__ushort_type(self) + + def depth(self): + return _OCD._Mat__ushort_depth(self) + + def channels(self): + return _OCD._Mat__ushort_channels(self) + + def step1(self, i=0): + return _OCD._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__ushort_swiginit(self, _OCD.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__ushort___str__(self) + __swig_destroy__ = _OCD.delete__Mat__ushort + +# Register _Mat__ushort in _OCD: +_OCD._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2w_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _OCD: +_OCD._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2w_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2w_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2w_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2w_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2w_type(self) + + def depth(self): + return _OCD._Mat__Vec2w_depth(self) + + def channels(self): + return _OCD._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2w_swiginit(self, _OCD.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2w___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _OCD: +_OCD._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3w_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _OCD: +_OCD._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3w_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3w_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3w_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3w_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3w_type(self) + + def depth(self): + return _OCD._Mat__Vec3w_depth(self) + + def channels(self): + return _OCD._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3w_swiginit(self, _OCD.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3w___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _OCD: +_OCD._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4w_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _OCD: +_OCD._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4w_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4w_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4w_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4w_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4w_type(self) + + def depth(self): + return _OCD._Mat__Vec4w_depth(self) + + def channels(self): + return _OCD._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4w_swiginit(self, _OCD.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4w___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _OCD: +_OCD._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__int_create(self, *args) + + def cross(self, m): + return _OCD._Mat__int_cross(self, m) + + def row(self, y): + return _OCD._Mat__int_row(self, y) + + def col(self, x): + return _OCD._Mat__int_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__int_diag(self, d) + + def clone(self): + return _OCD._Mat__int_clone(self) + + def elemSize(self): + return _OCD._Mat__int_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__int_elemSize1(self) + + def type(self): + return _OCD._Mat__int_type(self) + + def depth(self): + return _OCD._Mat__int_depth(self) + + def channels(self): + return _OCD._Mat__int_channels(self) + + def step1(self, i=0): + return _OCD._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__int___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__int_swiginit(self, _OCD.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__int___str__(self) + __swig_destroy__ = _OCD.delete__Mat__int + +# Register _Mat__int in _OCD: +_OCD._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2i_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _OCD: +_OCD._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2i_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2i_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2i_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2i_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2i_type(self) + + def depth(self): + return _OCD._Mat__Vec2i_depth(self) + + def channels(self): + return _OCD._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2i_swiginit(self, _OCD.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2i___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _OCD: +_OCD._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3i_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _OCD: +_OCD._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3i_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3i_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3i_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3i_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3i_type(self) + + def depth(self): + return _OCD._Mat__Vec3i_depth(self) + + def channels(self): + return _OCD._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3i_swiginit(self, _OCD.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3i___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _OCD: +_OCD._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4i_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _OCD: +_OCD._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4i_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4i_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4i_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4i_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4i_type(self) + + def depth(self): + return _OCD._Mat__Vec4i_depth(self) + + def channels(self): + return _OCD._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4i_swiginit(self, _OCD.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4i___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _OCD: +_OCD._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__float_create(self, *args) + + def cross(self, m): + return _OCD._Mat__float_cross(self, m) + + def row(self, y): + return _OCD._Mat__float_row(self, y) + + def col(self, x): + return _OCD._Mat__float_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__float_diag(self, d) + + def clone(self): + return _OCD._Mat__float_clone(self) + + def elemSize(self): + return _OCD._Mat__float_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__float_elemSize1(self) + + def type(self): + return _OCD._Mat__float_type(self) + + def depth(self): + return _OCD._Mat__float_depth(self) + + def channels(self): + return _OCD._Mat__float_channels(self) + + def step1(self, i=0): + return _OCD._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__float___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__float_swiginit(self, _OCD.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__float___str__(self) + __swig_destroy__ = _OCD.delete__Mat__float + +# Register _Mat__float in _OCD: +_OCD._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2f_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _OCD: +_OCD._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2f_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2f_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2f_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2f_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2f_type(self) + + def depth(self): + return _OCD._Mat__Vec2f_depth(self) + + def channels(self): + return _OCD._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2f_swiginit(self, _OCD.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2f___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _OCD: +_OCD._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3f_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _OCD: +_OCD._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3f_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3f_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3f_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3f_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3f_type(self) + + def depth(self): + return _OCD._Mat__Vec3f_depth(self) + + def channels(self): + return _OCD._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3f_swiginit(self, _OCD.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3f___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _OCD: +_OCD._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4f_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _OCD: +_OCD._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4f_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4f_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4f_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4f_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4f_type(self) + + def depth(self): + return _OCD._Mat__Vec4f_depth(self) + + def channels(self): + return _OCD._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4f_swiginit(self, _OCD.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4f___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _OCD: +_OCD._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__double_create(self, *args) + + def cross(self, m): + return _OCD._Mat__double_cross(self, m) + + def row(self, y): + return _OCD._Mat__double_row(self, y) + + def col(self, x): + return _OCD._Mat__double_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__double_diag(self, d) + + def clone(self): + return _OCD._Mat__double_clone(self) + + def elemSize(self): + return _OCD._Mat__double_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__double_elemSize1(self) + + def type(self): + return _OCD._Mat__double_type(self) + + def depth(self): + return _OCD._Mat__double_depth(self) + + def channels(self): + return _OCD._Mat__double_channels(self) + + def step1(self, i=0): + return _OCD._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__double___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__double_swiginit(self, _OCD.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__double___str__(self) + __swig_destroy__ = _OCD.delete__Mat__double + +# Register _Mat__double in _OCD: +_OCD._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2d_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _OCD: +_OCD._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2d_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2d_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2d_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2d_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2d_type(self) + + def depth(self): + return _OCD._Mat__Vec2d_depth(self) + + def channels(self): + return _OCD._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2d_swiginit(self, _OCD.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2d___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _OCD: +_OCD._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3d_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _OCD: +_OCD._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3d_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3d_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3d_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3d_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3d_type(self) + + def depth(self): + return _OCD._Mat__Vec3d_depth(self) + + def channels(self): + return _OCD._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3d_swiginit(self, _OCD.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3d___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _OCD: +_OCD._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4d_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _OCD: +_OCD._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4d_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4d_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4d_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4d_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4d_type(self) + + def depth(self): + return _OCD._Mat__Vec4d_depth(self) + + def channels(self): + return _OCD._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4d_swiginit(self, _OCD.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4d___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _OCD: +_OCD._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_1_2_rows + cols = _OCD._Matx_float_1_2_cols + channels = _OCD._Matx_float_1_2_channels + shortdim = _OCD._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_1_2_ddot(self, v) + + def t(self): + return _OCD._Matx_float_1_2_t(self) + + def mul(self, a): + return _OCD._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_1_2___call__(self, i, j) + val = property(_OCD._Matx_float_1_2_val_get, _OCD._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_1_2_swiginit(self, _OCD.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_1_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _OCD: +_OCD._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _OCD._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _OCD._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _OCD._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _OCD._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _OCD._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _OCD._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_1_2_rows + cols = _OCD._Matx_double_1_2_cols + channels = _OCD._Matx_double_1_2_channels + shortdim = _OCD._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_1_2_ddot(self, v) + + def t(self): + return _OCD._Matx_double_1_2_t(self) + + def mul(self, a): + return _OCD._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_1_2___call__(self, i, j) + val = property(_OCD._Matx_double_1_2_val_get, _OCD._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_1_2_swiginit(self, _OCD.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_1_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _OCD: +_OCD._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _OCD._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _OCD._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _OCD._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _OCD._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _OCD._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _OCD._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_1_3_rows + cols = _OCD._Matx_float_1_3_cols + channels = _OCD._Matx_float_1_3_channels + shortdim = _OCD._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_1_3_ddot(self, v) + + def t(self): + return _OCD._Matx_float_1_3_t(self) + + def mul(self, a): + return _OCD._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_1_3___call__(self, i, j) + val = property(_OCD._Matx_float_1_3_val_get, _OCD._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_1_3_swiginit(self, _OCD.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_1_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _OCD: +_OCD._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _OCD._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _OCD._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _OCD._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _OCD._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _OCD._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _OCD._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_1_3_rows + cols = _OCD._Matx_double_1_3_cols + channels = _OCD._Matx_double_1_3_channels + shortdim = _OCD._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_1_3_ddot(self, v) + + def t(self): + return _OCD._Matx_double_1_3_t(self) + + def mul(self, a): + return _OCD._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_1_3___call__(self, i, j) + val = property(_OCD._Matx_double_1_3_val_get, _OCD._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_1_3_swiginit(self, _OCD.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_1_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _OCD: +_OCD._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _OCD._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _OCD._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _OCD._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _OCD._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _OCD._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _OCD._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_1_4_rows + cols = _OCD._Matx_float_1_4_cols + channels = _OCD._Matx_float_1_4_channels + shortdim = _OCD._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_1_4_ddot(self, v) + + def t(self): + return _OCD._Matx_float_1_4_t(self) + + def mul(self, a): + return _OCD._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_1_4___call__(self, i, j) + val = property(_OCD._Matx_float_1_4_val_get, _OCD._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_1_4_swiginit(self, _OCD.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_1_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _OCD: +_OCD._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _OCD._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _OCD._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _OCD._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _OCD._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _OCD._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _OCD._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_1_4_rows + cols = _OCD._Matx_double_1_4_cols + channels = _OCD._Matx_double_1_4_channels + shortdim = _OCD._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_1_4_ddot(self, v) + + def t(self): + return _OCD._Matx_double_1_4_t(self) + + def mul(self, a): + return _OCD._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_1_4___call__(self, i, j) + val = property(_OCD._Matx_double_1_4_val_get, _OCD._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_1_4_swiginit(self, _OCD.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_1_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _OCD: +_OCD._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _OCD._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _OCD._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _OCD._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _OCD._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _OCD._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _OCD._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_1_6_rows + cols = _OCD._Matx_float_1_6_cols + channels = _OCD._Matx_float_1_6_channels + shortdim = _OCD._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_1_6_ddot(self, v) + + def t(self): + return _OCD._Matx_float_1_6_t(self) + + def mul(self, a): + return _OCD._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_1_6___call__(self, i, j) + val = property(_OCD._Matx_float_1_6_val_get, _OCD._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_1_6_swiginit(self, _OCD.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_1_6___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _OCD: +_OCD._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _OCD._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _OCD._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _OCD._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _OCD._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _OCD._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _OCD._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_1_6_rows + cols = _OCD._Matx_double_1_6_cols + channels = _OCD._Matx_double_1_6_channels + shortdim = _OCD._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_1_6_ddot(self, v) + + def t(self): + return _OCD._Matx_double_1_6_t(self) + + def mul(self, a): + return _OCD._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_1_6___call__(self, i, j) + val = property(_OCD._Matx_double_1_6_val_get, _OCD._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_1_6_swiginit(self, _OCD.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_1_6___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _OCD: +_OCD._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _OCD._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _OCD._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _OCD._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _OCD._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _OCD._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _OCD._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_2_2_rows + cols = _OCD._Matx_float_2_2_cols + channels = _OCD._Matx_float_2_2_channels + shortdim = _OCD._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_2_2_ddot(self, v) + + def t(self): + return _OCD._Matx_float_2_2_t(self) + + def mul(self, a): + return _OCD._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_2_2___call__(self, i, j) + val = property(_OCD._Matx_float_2_2_val_get, _OCD._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_2_2_swiginit(self, _OCD.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_2_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _OCD: +_OCD._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _OCD._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _OCD._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _OCD._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _OCD._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _OCD._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _OCD._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_2_2_rows + cols = _OCD._Matx_double_2_2_cols + channels = _OCD._Matx_double_2_2_channels + shortdim = _OCD._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_2_2_ddot(self, v) + + def t(self): + return _OCD._Matx_double_2_2_t(self) + + def mul(self, a): + return _OCD._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_2_2___call__(self, i, j) + val = property(_OCD._Matx_double_2_2_val_get, _OCD._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_2_2_swiginit(self, _OCD.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_2_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _OCD: +_OCD._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _OCD._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _OCD._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _OCD._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _OCD._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _OCD._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _OCD._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_2_3_rows + cols = _OCD._Matx_float_2_3_cols + channels = _OCD._Matx_float_2_3_channels + shortdim = _OCD._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_2_3_ddot(self, v) + + def t(self): + return _OCD._Matx_float_2_3_t(self) + + def mul(self, a): + return _OCD._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_2_3___call__(self, i, j) + val = property(_OCD._Matx_float_2_3_val_get, _OCD._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_2_3_swiginit(self, _OCD.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_2_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _OCD: +_OCD._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _OCD._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _OCD._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _OCD._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _OCD._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _OCD._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _OCD._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_2_3_rows + cols = _OCD._Matx_double_2_3_cols + channels = _OCD._Matx_double_2_3_channels + shortdim = _OCD._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_2_3_ddot(self, v) + + def t(self): + return _OCD._Matx_double_2_3_t(self) + + def mul(self, a): + return _OCD._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_2_3___call__(self, i, j) + val = property(_OCD._Matx_double_2_3_val_get, _OCD._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_2_3_swiginit(self, _OCD.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_2_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _OCD: +_OCD._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _OCD._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _OCD._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _OCD._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _OCD._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _OCD._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _OCD._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_3_2_rows + cols = _OCD._Matx_float_3_2_cols + channels = _OCD._Matx_float_3_2_channels + shortdim = _OCD._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_3_2_ddot(self, v) + + def t(self): + return _OCD._Matx_float_3_2_t(self) + + def mul(self, a): + return _OCD._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_3_2___call__(self, i, j) + val = property(_OCD._Matx_float_3_2_val_get, _OCD._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_3_2_swiginit(self, _OCD.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_3_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _OCD: +_OCD._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _OCD._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _OCD._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _OCD._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _OCD._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _OCD._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _OCD._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_3_2_rows + cols = _OCD._Matx_double_3_2_cols + channels = _OCD._Matx_double_3_2_channels + shortdim = _OCD._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_3_2_ddot(self, v) + + def t(self): + return _OCD._Matx_double_3_2_t(self) + + def mul(self, a): + return _OCD._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_3_2___call__(self, i, j) + val = property(_OCD._Matx_double_3_2_val_get, _OCD._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_3_2_swiginit(self, _OCD.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_3_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _OCD: +_OCD._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _OCD._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _OCD._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _OCD._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _OCD._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _OCD._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _OCD._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_3_3_rows + cols = _OCD._Matx_float_3_3_cols + channels = _OCD._Matx_float_3_3_channels + shortdim = _OCD._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_3_3_ddot(self, v) + + def t(self): + return _OCD._Matx_float_3_3_t(self) + + def mul(self, a): + return _OCD._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_3_3___call__(self, i, j) + val = property(_OCD._Matx_float_3_3_val_get, _OCD._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_3_3_swiginit(self, _OCD.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_3_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _OCD: +_OCD._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _OCD._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _OCD._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _OCD._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _OCD._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _OCD._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _OCD._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_3_3_rows + cols = _OCD._Matx_double_3_3_cols + channels = _OCD._Matx_double_3_3_channels + shortdim = _OCD._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_3_3_ddot(self, v) + + def t(self): + return _OCD._Matx_double_3_3_t(self) + + def mul(self, a): + return _OCD._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_3_3___call__(self, i, j) + val = property(_OCD._Matx_double_3_3_val_get, _OCD._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_3_3_swiginit(self, _OCD.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_3_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _OCD: +_OCD._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _OCD._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _OCD._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _OCD._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _OCD._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _OCD._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _OCD._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_3_4_rows + cols = _OCD._Matx_float_3_4_cols + channels = _OCD._Matx_float_3_4_channels + shortdim = _OCD._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_3_4_ddot(self, v) + + def t(self): + return _OCD._Matx_float_3_4_t(self) + + def mul(self, a): + return _OCD._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_3_4___call__(self, i, j) + val = property(_OCD._Matx_float_3_4_val_get, _OCD._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_3_4_swiginit(self, _OCD.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_3_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _OCD: +_OCD._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _OCD._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _OCD._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _OCD._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _OCD._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _OCD._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _OCD._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_3_4_rows + cols = _OCD._Matx_double_3_4_cols + channels = _OCD._Matx_double_3_4_channels + shortdim = _OCD._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_3_4_ddot(self, v) + + def t(self): + return _OCD._Matx_double_3_4_t(self) + + def mul(self, a): + return _OCD._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_3_4___call__(self, i, j) + val = property(_OCD._Matx_double_3_4_val_get, _OCD._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_3_4_swiginit(self, _OCD.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_3_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _OCD: +_OCD._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _OCD._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _OCD._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _OCD._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _OCD._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _OCD._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _OCD._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_4_3_rows + cols = _OCD._Matx_float_4_3_cols + channels = _OCD._Matx_float_4_3_channels + shortdim = _OCD._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_4_3_ddot(self, v) + + def t(self): + return _OCD._Matx_float_4_3_t(self) + + def mul(self, a): + return _OCD._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_4_3___call__(self, i, j) + val = property(_OCD._Matx_float_4_3_val_get, _OCD._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_4_3_swiginit(self, _OCD.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_4_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _OCD: +_OCD._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _OCD._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _OCD._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _OCD._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _OCD._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _OCD._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _OCD._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_4_3_rows + cols = _OCD._Matx_double_4_3_cols + channels = _OCD._Matx_double_4_3_channels + shortdim = _OCD._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_4_3_ddot(self, v) + + def t(self): + return _OCD._Matx_double_4_3_t(self) + + def mul(self, a): + return _OCD._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_4_3___call__(self, i, j) + val = property(_OCD._Matx_double_4_3_val_get, _OCD._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_4_3_swiginit(self, _OCD.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_4_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _OCD: +_OCD._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _OCD._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _OCD._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _OCD._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _OCD._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _OCD._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _OCD._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_4_4_rows + cols = _OCD._Matx_float_4_4_cols + channels = _OCD._Matx_float_4_4_channels + shortdim = _OCD._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_4_4_ddot(self, v) + + def t(self): + return _OCD._Matx_float_4_4_t(self) + + def mul(self, a): + return _OCD._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_4_4___call__(self, i, j) + val = property(_OCD._Matx_float_4_4_val_get, _OCD._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_4_4_swiginit(self, _OCD.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_4_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _OCD: +_OCD._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _OCD._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _OCD._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _OCD._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _OCD._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _OCD._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _OCD._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_4_4_rows + cols = _OCD._Matx_double_4_4_cols + channels = _OCD._Matx_double_4_4_channels + shortdim = _OCD._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_4_4_ddot(self, v) + + def t(self): + return _OCD._Matx_double_4_4_t(self) + + def mul(self, a): + return _OCD._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_4_4___call__(self, i, j) + val = property(_OCD._Matx_double_4_4_val_get, _OCD._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_4_4_swiginit(self, _OCD.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_4_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _OCD: +_OCD._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _OCD._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _OCD._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _OCD._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _OCD._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _OCD._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _OCD._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_6_6_rows + cols = _OCD._Matx_float_6_6_cols + channels = _OCD._Matx_float_6_6_channels + shortdim = _OCD._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_6_6_ddot(self, v) + + def t(self): + return _OCD._Matx_float_6_6_t(self) + + def mul(self, a): + return _OCD._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_6_6___call__(self, i, j) + val = property(_OCD._Matx_float_6_6_val_get, _OCD._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_6_6_swiginit(self, _OCD.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_6_6___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _OCD: +_OCD._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _OCD._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _OCD._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _OCD._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _OCD._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _OCD._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _OCD._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_6_6_rows + cols = _OCD._Matx_double_6_6_cols + channels = _OCD._Matx_double_6_6_channels + shortdim = _OCD._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_6_6_ddot(self, v) + + def t(self): + return _OCD._Matx_double_6_6_t(self) + + def mul(self, a): + return _OCD._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_6_6___call__(self, i, j) + val = property(_OCD._Matx_double_6_6_val_get, _OCD._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_6_6_swiginit(self, _OCD.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_6_6___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _OCD: +_OCD._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _OCD._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _OCD._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _OCD._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _OCD._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _OCD._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _OCD._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Point__int_swiginit(self, _OCD.new__Point__int(*args)) + + def dot(self, pt): + return _OCD._Point__int_dot(self, pt) + + def ddot(self, pt): + return _OCD._Point__int_ddot(self, pt) + + def cross(self, pt): + return _OCD._Point__int_cross(self, pt) + x = property(_OCD._Point__int_x_get, _OCD._Point__int_x_set) + y = property(_OCD._Point__int_y_get, _OCD._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _OCD._Point__int___str__(self) + __swig_destroy__ = _OCD.delete__Point__int + +# Register _Point__int in _OCD: +_OCD._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Point__float_swiginit(self, _OCD.new__Point__float(*args)) + + def dot(self, pt): + return _OCD._Point__float_dot(self, pt) + + def ddot(self, pt): + return _OCD._Point__float_ddot(self, pt) + + def cross(self, pt): + return _OCD._Point__float_cross(self, pt) + x = property(_OCD._Point__float_x_get, _OCD._Point__float_x_set) + y = property(_OCD._Point__float_y_get, _OCD._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _OCD._Point__float___str__(self) + __swig_destroy__ = _OCD.delete__Point__float + +# Register _Point__float in _OCD: +_OCD._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Point__double_swiginit(self, _OCD.new__Point__double(*args)) + + def dot(self, pt): + return _OCD._Point__double_dot(self, pt) + + def ddot(self, pt): + return _OCD._Point__double_ddot(self, pt) + + def cross(self, pt): + return _OCD._Point__double_cross(self, pt) + x = property(_OCD._Point__double_x_get, _OCD._Point__double_x_set) + y = property(_OCD._Point__double_y_get, _OCD._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _OCD._Point__double___str__(self) + __swig_destroy__ = _OCD.delete__Point__double + +# Register _Point__double in _OCD: +_OCD._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Rect__int_swiginit(self, _OCD.new__Rect__int(*args)) + + def tl(self): + return _OCD._Rect__int_tl(self) + + def br(self): + return _OCD._Rect__int_br(self) + + def size(self): + return _OCD._Rect__int_size(self) + + def area(self): + return _OCD._Rect__int_area(self) + + def contains(self, pt): + return _OCD._Rect__int_contains(self, pt) + x = property(_OCD._Rect__int_x_get, _OCD._Rect__int_x_set) + y = property(_OCD._Rect__int_y_get, _OCD._Rect__int_y_set) + width = property(_OCD._Rect__int_width_get, _OCD._Rect__int_width_set) + height = property(_OCD._Rect__int_height_get, _OCD._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _OCD._Rect__int___str__(self) + __swig_destroy__ = _OCD.delete__Rect__int + +# Register _Rect__int in _OCD: +_OCD._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Rect__float_swiginit(self, _OCD.new__Rect__float(*args)) + + def tl(self): + return _OCD._Rect__float_tl(self) + + def br(self): + return _OCD._Rect__float_br(self) + + def size(self): + return _OCD._Rect__float_size(self) + + def area(self): + return _OCD._Rect__float_area(self) + + def contains(self, pt): + return _OCD._Rect__float_contains(self, pt) + x = property(_OCD._Rect__float_x_get, _OCD._Rect__float_x_set) + y = property(_OCD._Rect__float_y_get, _OCD._Rect__float_y_set) + width = property(_OCD._Rect__float_width_get, _OCD._Rect__float_width_set) + height = property(_OCD._Rect__float_height_get, _OCD._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _OCD._Rect__float___str__(self) + __swig_destroy__ = _OCD.delete__Rect__float + +# Register _Rect__float in _OCD: +_OCD._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Rect__double_swiginit(self, _OCD.new__Rect__double(*args)) + + def tl(self): + return _OCD._Rect__double_tl(self) + + def br(self): + return _OCD._Rect__double_br(self) + + def size(self): + return _OCD._Rect__double_size(self) + + def area(self): + return _OCD._Rect__double_area(self) + + def contains(self, pt): + return _OCD._Rect__double_contains(self, pt) + x = property(_OCD._Rect__double_x_get, _OCD._Rect__double_x_set) + y = property(_OCD._Rect__double_y_get, _OCD._Rect__double_y_set) + width = property(_OCD._Rect__double_width_get, _OCD._Rect__double_width_set) + height = property(_OCD._Rect__double_height_get, _OCD._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _OCD._Rect__double___str__(self) + __swig_destroy__ = _OCD.delete__Rect__double + +# Register _Rect__double in _OCD: +_OCD._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Scalar__double_swiginit(self, _OCD.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _OCD._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _OCD._Scalar__double_mul(self, a, scale) + + def conj(self): + return _OCD._Scalar__double_conj(self) + + def isReal(self): + return _OCD._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Scalar__double___str__(self) + __swig_destroy__ = _OCD.delete__Scalar__double + +# Register _Scalar__double in _OCD: +_OCD._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _OCD._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Size__int_swiginit(self, _OCD.new__Size__int(*args)) + + def area(self): + return _OCD._Size__int_area(self) + width = property(_OCD._Size__int_width_get, _OCD._Size__int_width_set) + height = property(_OCD._Size__int_height_get, _OCD._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _OCD._Size__int___str__(self) + __swig_destroy__ = _OCD.delete__Size__int + +# Register _Size__int in _OCD: +_OCD._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Size__float_swiginit(self, _OCD.new__Size__float(*args)) + + def area(self): + return _OCD._Size__float_area(self) + width = property(_OCD._Size__float_width_get, _OCD._Size__float_width_set) + height = property(_OCD._Size__float_height_get, _OCD._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _OCD._Size__float___str__(self) + __swig_destroy__ = _OCD.delete__Size__float + +# Register _Size__float in _OCD: +_OCD._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Size__double_swiginit(self, _OCD.new__Size__double(*args)) + + def area(self): + return _OCD._Size__double_area(self) + width = property(_OCD._Size__double_width_get, _OCD._Size__double_width_set) + height = property(_OCD._Size__double_height_get, _OCD._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _OCD._Size__double___str__(self) + __swig_destroy__ = _OCD.delete__Size__double + +# Register _Size__double in _OCD: +_OCD._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def OCD(file1, file2, outfile, dir): + return _OCD.OCD(file1, file2, outfile, dir) + + diff --git a/plugins/unsupervised_method/scripts/SH.py b/plugins/unsupervised_method/scripts/SH.py new file mode 100644 index 0000000..fcff025 --- /dev/null +++ b/plugins/unsupervised_method/scripts/SH.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _SH +else: + import _SH + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _SH.CV_VERSION_MAJOR +CV_VERSION_MINOR = _SH.CV_VERSION_MINOR +CV_VERSION_REVISION = _SH.CV_VERSION_REVISION +CV_VERSION_STATUS = _SH.CV_VERSION_STATUS +CV_VERSION = _SH.CV_VERSION +CV_MAJOR_VERSION = _SH.CV_MAJOR_VERSION +CV_MINOR_VERSION = _SH.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _SH.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_bool_generic_type + channels = _SH.DataType_bool_channels + fmt = _SH.DataType_bool_fmt + + def __init__(self): + _SH.DataType_bool_swiginit(self, _SH.new_DataType_bool()) + __swig_destroy__ = _SH.delete_DataType_bool + +# Register DataType_bool in _SH: +_SH.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_uchar_generic_type + channels = _SH.DataType_uchar_channels + fmt = _SH.DataType_uchar_fmt + + def __init__(self): + _SH.DataType_uchar_swiginit(self, _SH.new_DataType_uchar()) + __swig_destroy__ = _SH.delete_DataType_uchar + +# Register DataType_uchar in _SH: +_SH.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_schar_generic_type + channels = _SH.DataType_schar_channels + fmt = _SH.DataType_schar_fmt + + def __init__(self): + _SH.DataType_schar_swiginit(self, _SH.new_DataType_schar()) + __swig_destroy__ = _SH.delete_DataType_schar + +# Register DataType_schar in _SH: +_SH.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_char_generic_type + channels = _SH.DataType_char_channels + fmt = _SH.DataType_char_fmt + + def __init__(self): + _SH.DataType_char_swiginit(self, _SH.new_DataType_char()) + __swig_destroy__ = _SH.delete_DataType_char + +# Register DataType_char in _SH: +_SH.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_ushort_generic_type + channels = _SH.DataType_ushort_channels + fmt = _SH.DataType_ushort_fmt + + def __init__(self): + _SH.DataType_ushort_swiginit(self, _SH.new_DataType_ushort()) + __swig_destroy__ = _SH.delete_DataType_ushort + +# Register DataType_ushort in _SH: +_SH.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_short_generic_type + channels = _SH.DataType_short_channels + fmt = _SH.DataType_short_fmt + + def __init__(self): + _SH.DataType_short_swiginit(self, _SH.new_DataType_short()) + __swig_destroy__ = _SH.delete_DataType_short + +# Register DataType_short in _SH: +_SH.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_int_generic_type + channels = _SH.DataType_int_channels + fmt = _SH.DataType_int_fmt + + def __init__(self): + _SH.DataType_int_swiginit(self, _SH.new_DataType_int()) + __swig_destroy__ = _SH.delete_DataType_int + +# Register DataType_int in _SH: +_SH.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_float_generic_type + channels = _SH.DataType_float_channels + fmt = _SH.DataType_float_fmt + + def __init__(self): + _SH.DataType_float_swiginit(self, _SH.new_DataType_float()) + __swig_destroy__ = _SH.delete_DataType_float + +# Register DataType_float in _SH: +_SH.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_double_generic_type + channels = _SH.DataType_double_channels + fmt = _SH.DataType_double_fmt + + def __init__(self): + _SH.DataType_double_swiginit(self, _SH.new_DataType_double()) + __swig_destroy__ = _SH.delete_DataType_double + +# Register DataType_double in _SH: +_SH.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH.Range_swiginit(self, _SH.new_Range(*args)) + + def size(self): + return _SH.Range_size(self) + + def empty(self): + return _SH.Range_empty(self) + + @staticmethod + def all(): + return _SH.Range_all() + start = property(_SH.Range_start_get, _SH.Range_start_set) + end = property(_SH.Range_end_get, _SH.Range_end_set) + __swig_destroy__ = _SH.delete_Range + +# Register Range in _SH: +_SH.Range_swigregister(Range) + +def Range_all(): + return _SH.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _SH.delete_SwigPyIterator + + def value(self): + return _SH.SwigPyIterator_value(self) + + def incr(self, n=1): + return _SH.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _SH.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _SH.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _SH.SwigPyIterator_equal(self, x) + + def copy(self): + return _SH.SwigPyIterator_copy(self) + + def next(self): + return _SH.SwigPyIterator_next(self) + + def __next__(self): + return _SH.SwigPyIterator___next__(self) + + def previous(self): + return _SH.SwigPyIterator_previous(self) + + def advance(self, n): + return _SH.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _SH.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _SH.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _SH.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _SH.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _SH.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _SH.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _SH: +_SH.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_AddOp_swiginit(self, _SH.new_Matx_AddOp()) + __swig_destroy__ = _SH.delete_Matx_AddOp + +# Register Matx_AddOp in _SH: +_SH.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_SubOp_swiginit(self, _SH.new_Matx_SubOp()) + __swig_destroy__ = _SH.delete_Matx_SubOp + +# Register Matx_SubOp in _SH: +_SH.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_ScaleOp_swiginit(self, _SH.new_Matx_ScaleOp()) + __swig_destroy__ = _SH.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _SH: +_SH.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_MulOp_swiginit(self, _SH.new_Matx_MulOp()) + __swig_destroy__ = _SH.delete_Matx_MulOp + +# Register Matx_MulOp in _SH: +_SH.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_DivOp_swiginit(self, _SH.new_Matx_DivOp()) + __swig_destroy__ = _SH.delete_Matx_DivOp + +# Register Matx_DivOp in _SH: +_SH.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_MatMulOp_swiginit(self, _SH.new_Matx_MatMulOp()) + __swig_destroy__ = _SH.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _SH: +_SH.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_TOp_swiginit(self, _SH.new_Matx_TOp()) + __swig_destroy__ = _SH.delete_Matx_TOp + +# Register Matx_TOp in _SH: +_SH.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _SH.delete_Mat + + def row(self, y): + return _SH.Mat_row(self, y) + + def col(self, x): + return _SH.Mat_col(self, x) + + def rowRange(self, *args): + return _SH.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _SH.Mat_colRange(self, *args) + + def diag(self, d=0): + return _SH.Mat_diag(self, d) + + def clone(self): + return _SH.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _SH.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _SH.Mat_reshape(self, *args) + + def create(self, *args): + return _SH.Mat_create(self, *args) + + def addref(self): + return _SH.Mat_addref(self) + + def release(self): + return _SH.Mat_release(self) + + def deallocate(self): + return _SH.Mat_deallocate(self) + + def copySize(self, m): + return _SH.Mat_copySize(self, m) + + def reserve(self, sz): + return _SH.Mat_reserve(self, sz) + + def resize(self, *args): + return _SH.Mat_resize(self, *args) + + def push_back_(self, elem): + return _SH.Mat_push_back_(self, elem) + + def push_back(self, m): + return _SH.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _SH.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _SH.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH.Mat___call__(self, *args) + + def isContinuous(self): + return _SH.Mat_isContinuous(self) + + def isSubmatrix(self): + return _SH.Mat_isSubmatrix(self) + + def elemSize(self): + return _SH.Mat_elemSize(self) + + def elemSize1(self): + return _SH.Mat_elemSize1(self) + + def type(self): + return _SH.Mat_type(self) + + def depth(self): + return _SH.Mat_depth(self) + + def channels(self): + return _SH.Mat_channels(self) + + def step1(self, i=0): + return _SH.Mat_step1(self, i) + + def empty(self): + return _SH.Mat_empty(self) + + def total(self): + return _SH.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _SH.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _SH.Mat_ptr(self, *args) + MAGIC_VAL = _SH.Mat_MAGIC_VAL + AUTO_STEP = _SH.Mat_AUTO_STEP + CONTINUOUS_FLAG = _SH.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _SH.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _SH.Mat_MAGIC_MASK + TYPE_MASK = _SH.Mat_TYPE_MASK + DEPTH_MASK = _SH.Mat_DEPTH_MASK + flags = property(_SH.Mat_flags_get, _SH.Mat_flags_set) + dims = property(_SH.Mat_dims_get, _SH.Mat_dims_set) + rows = property(_SH.Mat_rows_get, _SH.Mat_rows_set) + cols = property(_SH.Mat_cols_get, _SH.Mat_cols_set) + data = property(_SH.Mat_data_get, _SH.Mat_data_set) + datastart = property(_SH.Mat_datastart_get, _SH.Mat_datastart_set) + dataend = property(_SH.Mat_dataend_get, _SH.Mat_dataend_set) + datalimit = property(_SH.Mat_datalimit_get, _SH.Mat_datalimit_set) + + def __init__(self, *args): + _SH.Mat_swiginit(self, _SH.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH.Mat___str__(self) + +# Register Mat in _SH: +_SH.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _SH._cv_numpy_sizeof_uint8_t_swiginit(self, _SH.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _SH: +_SH._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _SH.uint8_tArray___bool__(self) + + def __len__(self): + return _SH.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _SH.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _SH.uint8_tArray_pop(self) + + def append(self, x): + return _SH.uint8_tArray_append(self, x) + + def empty(self): + return _SH.uint8_tArray_empty(self) + + def size(self): + return _SH.uint8_tArray_size(self) + + def swap(self, v): + return _SH.uint8_tArray_swap(self, v) + + def begin(self): + return _SH.uint8_tArray_begin(self) + + def end(self): + return _SH.uint8_tArray_end(self) + + def rbegin(self): + return _SH.uint8_tArray_rbegin(self) + + def rend(self): + return _SH.uint8_tArray_rend(self) + + def clear(self): + return _SH.uint8_tArray_clear(self) + + def get_allocator(self): + return _SH.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _SH.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _SH.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _SH.uint8_tArray_swiginit(self, _SH.new_uint8_tArray(*args)) + + def push_back(self, x): + return _SH.uint8_tArray_push_back(self, x) + + def front(self): + return _SH.uint8_tArray_front(self) + + def back(self): + return _SH.uint8_tArray_back(self) + + def assign(self, n, x): + return _SH.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _SH.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _SH.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _SH.uint8_tArray_reserve(self, n) + + def capacity(self): + return _SH.uint8_tArray_capacity(self) + __swig_destroy__ = _SH.delete_uint8_tArray + +# Register uint8_tArray in _SH: +_SH.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_uint8_t_2_1_rows + cols = _SH._Matx_uint8_t_2_1_cols + channels = _SH._Matx_uint8_t_2_1_channels + shortdim = _SH._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _SH._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_SH._Matx_uint8_t_2_1_val_get, _SH._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_uint8_t_2_1_swiginit(self, _SH.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _SH: +_SH._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _SH._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _SH._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _SH._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _SH._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _SH._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _SH._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _SH._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_uint8_t_2_swiginit(self, _SH.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _SH: +_SH._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _SH._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_uint8_t_2_generic_type + channels = _SH._DataType_Vec_uint8_t_2_channels + fmt = _SH._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _SH._DataType_Vec_uint8_t_2_swiginit(self, _SH.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _SH: +_SH._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_uint8_t_3_1_rows + cols = _SH._Matx_uint8_t_3_1_cols + channels = _SH._Matx_uint8_t_3_1_channels + shortdim = _SH._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _SH._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_SH._Matx_uint8_t_3_1_val_get, _SH._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_uint8_t_3_1_swiginit(self, _SH.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _SH: +_SH._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _SH._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _SH._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _SH._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _SH._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _SH._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _SH._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _SH._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_uint8_t_3_swiginit(self, _SH.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _SH: +_SH._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _SH._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_uint8_t_3_generic_type + channels = _SH._DataType_Vec_uint8_t_3_channels + fmt = _SH._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _SH._DataType_Vec_uint8_t_3_swiginit(self, _SH.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _SH: +_SH._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_uint8_t_4_1_rows + cols = _SH._Matx_uint8_t_4_1_cols + channels = _SH._Matx_uint8_t_4_1_channels + shortdim = _SH._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _SH._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_SH._Matx_uint8_t_4_1_val_get, _SH._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_uint8_t_4_1_swiginit(self, _SH.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _SH: +_SH._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _SH._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _SH._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _SH._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _SH._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _SH._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _SH._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _SH._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_uint8_t_4_swiginit(self, _SH.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _SH: +_SH._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _SH._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_uint8_t_4_generic_type + channels = _SH._DataType_Vec_uint8_t_4_channels + fmt = _SH._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _SH._DataType_Vec_uint8_t_4_swiginit(self, _SH.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _SH: +_SH._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_short_value + + def __init__(self): + _SH._cv_numpy_sizeof_short_swiginit(self, _SH.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _SH: +_SH._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.shortArray___nonzero__(self) + + def __bool__(self): + return _SH.shortArray___bool__(self) + + def __len__(self): + return _SH.shortArray___len__(self) + + def __getslice__(self, i, j): + return _SH.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.shortArray___setitem__(self, *args) + + def pop(self): + return _SH.shortArray_pop(self) + + def append(self, x): + return _SH.shortArray_append(self, x) + + def empty(self): + return _SH.shortArray_empty(self) + + def size(self): + return _SH.shortArray_size(self) + + def swap(self, v): + return _SH.shortArray_swap(self, v) + + def begin(self): + return _SH.shortArray_begin(self) + + def end(self): + return _SH.shortArray_end(self) + + def rbegin(self): + return _SH.shortArray_rbegin(self) + + def rend(self): + return _SH.shortArray_rend(self) + + def clear(self): + return _SH.shortArray_clear(self) + + def get_allocator(self): + return _SH.shortArray_get_allocator(self) + + def pop_back(self): + return _SH.shortArray_pop_back(self) + + def erase(self, *args): + return _SH.shortArray_erase(self, *args) + + def __init__(self, *args): + _SH.shortArray_swiginit(self, _SH.new_shortArray(*args)) + + def push_back(self, x): + return _SH.shortArray_push_back(self, x) + + def front(self): + return _SH.shortArray_front(self) + + def back(self): + return _SH.shortArray_back(self) + + def assign(self, n, x): + return _SH.shortArray_assign(self, n, x) + + def resize(self, *args): + return _SH.shortArray_resize(self, *args) + + def insert(self, *args): + return _SH.shortArray_insert(self, *args) + + def reserve(self, n): + return _SH.shortArray_reserve(self, n) + + def capacity(self): + return _SH.shortArray_capacity(self) + __swig_destroy__ = _SH.delete_shortArray + +# Register shortArray in _SH: +_SH.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_short_2_1_rows + cols = _SH._Matx_short_2_1_cols + channels = _SH._Matx_short_2_1_channels + shortdim = _SH._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_short_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_short_2_1_t(self) + + def mul(self, a): + return _SH._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_short_2_1___call__(self, i, j) + val = property(_SH._Matx_short_2_1_val_get, _SH._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_short_2_1_swiginit(self, _SH.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_short_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _SH: +_SH._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _SH._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _SH._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _SH._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _SH._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _SH._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _SH._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_short_2_all(alpha) + + def mul(self, v): + return _SH._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_short_2_swiginit(self, _SH.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_short_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_short_2 + +# Register _Vec_short_2 in _SH: +_SH._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _SH._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_short_2_generic_type + channels = _SH._DataType_Vec_short_2_channels + fmt = _SH._DataType_Vec_short_2_fmt + + def __init__(self): + _SH._DataType_Vec_short_2_swiginit(self, _SH.new__DataType_Vec_short_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _SH: +_SH._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_short_3_1_rows + cols = _SH._Matx_short_3_1_cols + channels = _SH._Matx_short_3_1_channels + shortdim = _SH._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_short_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_short_3_1_t(self) + + def mul(self, a): + return _SH._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_short_3_1___call__(self, i, j) + val = property(_SH._Matx_short_3_1_val_get, _SH._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_short_3_1_swiginit(self, _SH.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_short_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _SH: +_SH._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _SH._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _SH._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _SH._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _SH._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _SH._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _SH._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_short_3_all(alpha) + + def mul(self, v): + return _SH._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_short_3_swiginit(self, _SH.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_short_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_short_3 + +# Register _Vec_short_3 in _SH: +_SH._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _SH._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_short_3_generic_type + channels = _SH._DataType_Vec_short_3_channels + fmt = _SH._DataType_Vec_short_3_fmt + + def __init__(self): + _SH._DataType_Vec_short_3_swiginit(self, _SH.new__DataType_Vec_short_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _SH: +_SH._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_short_4_1_rows + cols = _SH._Matx_short_4_1_cols + channels = _SH._Matx_short_4_1_channels + shortdim = _SH._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_short_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_short_4_1_t(self) + + def mul(self, a): + return _SH._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_short_4_1___call__(self, i, j) + val = property(_SH._Matx_short_4_1_val_get, _SH._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_short_4_1_swiginit(self, _SH.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_short_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _SH: +_SH._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _SH._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _SH._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _SH._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _SH._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _SH._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _SH._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_short_4_all(alpha) + + def mul(self, v): + return _SH._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_short_4_swiginit(self, _SH.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_short_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_short_4 + +# Register _Vec_short_4 in _SH: +_SH._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _SH._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_short_4_generic_type + channels = _SH._DataType_Vec_short_4_channels + fmt = _SH._DataType_Vec_short_4_fmt + + def __init__(self): + _SH._DataType_Vec_short_4_swiginit(self, _SH.new__DataType_Vec_short_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _SH: +_SH._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_ushort_value + + def __init__(self): + _SH._cv_numpy_sizeof_ushort_swiginit(self, _SH.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _SH: +_SH._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.ushortArray___nonzero__(self) + + def __bool__(self): + return _SH.ushortArray___bool__(self) + + def __len__(self): + return _SH.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _SH.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.ushortArray___setitem__(self, *args) + + def pop(self): + return _SH.ushortArray_pop(self) + + def append(self, x): + return _SH.ushortArray_append(self, x) + + def empty(self): + return _SH.ushortArray_empty(self) + + def size(self): + return _SH.ushortArray_size(self) + + def swap(self, v): + return _SH.ushortArray_swap(self, v) + + def begin(self): + return _SH.ushortArray_begin(self) + + def end(self): + return _SH.ushortArray_end(self) + + def rbegin(self): + return _SH.ushortArray_rbegin(self) + + def rend(self): + return _SH.ushortArray_rend(self) + + def clear(self): + return _SH.ushortArray_clear(self) + + def get_allocator(self): + return _SH.ushortArray_get_allocator(self) + + def pop_back(self): + return _SH.ushortArray_pop_back(self) + + def erase(self, *args): + return _SH.ushortArray_erase(self, *args) + + def __init__(self, *args): + _SH.ushortArray_swiginit(self, _SH.new_ushortArray(*args)) + + def push_back(self, x): + return _SH.ushortArray_push_back(self, x) + + def front(self): + return _SH.ushortArray_front(self) + + def back(self): + return _SH.ushortArray_back(self) + + def assign(self, n, x): + return _SH.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _SH.ushortArray_resize(self, *args) + + def insert(self, *args): + return _SH.ushortArray_insert(self, *args) + + def reserve(self, n): + return _SH.ushortArray_reserve(self, n) + + def capacity(self): + return _SH.ushortArray_capacity(self) + __swig_destroy__ = _SH.delete_ushortArray + +# Register ushortArray in _SH: +_SH.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_ushort_2_1_rows + cols = _SH._Matx_ushort_2_1_cols + channels = _SH._Matx_ushort_2_1_channels + shortdim = _SH._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _SH._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_ushort_2_1___call__(self, i, j) + val = property(_SH._Matx_ushort_2_1_val_get, _SH._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_ushort_2_1_swiginit(self, _SH.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _SH: +_SH._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _SH._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _SH._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _SH._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _SH._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _SH._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _SH._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _SH._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_ushort_2_swiginit(self, _SH.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_ushort_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _SH: +_SH._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _SH._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_ushort_2_generic_type + channels = _SH._DataType_Vec_ushort_2_channels + fmt = _SH._DataType_Vec_ushort_2_fmt + + def __init__(self): + _SH._DataType_Vec_ushort_2_swiginit(self, _SH.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _SH: +_SH._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_ushort_3_1_rows + cols = _SH._Matx_ushort_3_1_cols + channels = _SH._Matx_ushort_3_1_channels + shortdim = _SH._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _SH._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_ushort_3_1___call__(self, i, j) + val = property(_SH._Matx_ushort_3_1_val_get, _SH._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_ushort_3_1_swiginit(self, _SH.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _SH: +_SH._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _SH._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _SH._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _SH._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _SH._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _SH._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _SH._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _SH._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_ushort_3_swiginit(self, _SH.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_ushort_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _SH: +_SH._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _SH._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_ushort_3_generic_type + channels = _SH._DataType_Vec_ushort_3_channels + fmt = _SH._DataType_Vec_ushort_3_fmt + + def __init__(self): + _SH._DataType_Vec_ushort_3_swiginit(self, _SH.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _SH: +_SH._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_ushort_4_1_rows + cols = _SH._Matx_ushort_4_1_cols + channels = _SH._Matx_ushort_4_1_channels + shortdim = _SH._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _SH._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_ushort_4_1___call__(self, i, j) + val = property(_SH._Matx_ushort_4_1_val_get, _SH._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_ushort_4_1_swiginit(self, _SH.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _SH: +_SH._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _SH._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _SH._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _SH._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _SH._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _SH._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _SH._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _SH._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_ushort_4_swiginit(self, _SH.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_ushort_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _SH: +_SH._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _SH._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_ushort_4_generic_type + channels = _SH._DataType_Vec_ushort_4_channels + fmt = _SH._DataType_Vec_ushort_4_fmt + + def __init__(self): + _SH._DataType_Vec_ushort_4_swiginit(self, _SH.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _SH: +_SH._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_int_value + + def __init__(self): + _SH._cv_numpy_sizeof_int_swiginit(self, _SH.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _SH: +_SH._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.intArray___nonzero__(self) + + def __bool__(self): + return _SH.intArray___bool__(self) + + def __len__(self): + return _SH.intArray___len__(self) + + def __getslice__(self, i, j): + return _SH.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.intArray___setitem__(self, *args) + + def pop(self): + return _SH.intArray_pop(self) + + def append(self, x): + return _SH.intArray_append(self, x) + + def empty(self): + return _SH.intArray_empty(self) + + def size(self): + return _SH.intArray_size(self) + + def swap(self, v): + return _SH.intArray_swap(self, v) + + def begin(self): + return _SH.intArray_begin(self) + + def end(self): + return _SH.intArray_end(self) + + def rbegin(self): + return _SH.intArray_rbegin(self) + + def rend(self): + return _SH.intArray_rend(self) + + def clear(self): + return _SH.intArray_clear(self) + + def get_allocator(self): + return _SH.intArray_get_allocator(self) + + def pop_back(self): + return _SH.intArray_pop_back(self) + + def erase(self, *args): + return _SH.intArray_erase(self, *args) + + def __init__(self, *args): + _SH.intArray_swiginit(self, _SH.new_intArray(*args)) + + def push_back(self, x): + return _SH.intArray_push_back(self, x) + + def front(self): + return _SH.intArray_front(self) + + def back(self): + return _SH.intArray_back(self) + + def assign(self, n, x): + return _SH.intArray_assign(self, n, x) + + def resize(self, *args): + return _SH.intArray_resize(self, *args) + + def insert(self, *args): + return _SH.intArray_insert(self, *args) + + def reserve(self, n): + return _SH.intArray_reserve(self, n) + + def capacity(self): + return _SH.intArray_capacity(self) + __swig_destroy__ = _SH.delete_intArray + +# Register intArray in _SH: +_SH.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_2_1_rows + cols = _SH._Matx_int_2_1_cols + channels = _SH._Matx_int_2_1_channels + shortdim = _SH._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_2_1_t(self) + + def mul(self, a): + return _SH._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_2_1___call__(self, i, j) + val = property(_SH._Matx_int_2_1_val_get, _SH._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_2_1_swiginit(self, _SH.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _SH: +_SH._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _SH._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _SH._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _SH._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _SH._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _SH._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _SH._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_2_all(alpha) + + def mul(self, v): + return _SH._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_2_swiginit(self, _SH.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_2 + +# Register _Vec_int_2 in _SH: +_SH._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _SH._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_2_generic_type + channels = _SH._DataType_Vec_int_2_channels + fmt = _SH._DataType_Vec_int_2_fmt + + def __init__(self): + _SH._DataType_Vec_int_2_swiginit(self, _SH.new__DataType_Vec_int_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _SH: +_SH._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_3_1_rows + cols = _SH._Matx_int_3_1_cols + channels = _SH._Matx_int_3_1_channels + shortdim = _SH._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_3_1_t(self) + + def mul(self, a): + return _SH._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_3_1___call__(self, i, j) + val = property(_SH._Matx_int_3_1_val_get, _SH._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_3_1_swiginit(self, _SH.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _SH: +_SH._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _SH._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _SH._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _SH._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _SH._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _SH._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _SH._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_3_all(alpha) + + def mul(self, v): + return _SH._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_3_swiginit(self, _SH.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_3 + +# Register _Vec_int_3 in _SH: +_SH._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _SH._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_3_generic_type + channels = _SH._DataType_Vec_int_3_channels + fmt = _SH._DataType_Vec_int_3_fmt + + def __init__(self): + _SH._DataType_Vec_int_3_swiginit(self, _SH.new__DataType_Vec_int_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _SH: +_SH._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_4_1_rows + cols = _SH._Matx_int_4_1_cols + channels = _SH._Matx_int_4_1_channels + shortdim = _SH._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_4_1_t(self) + + def mul(self, a): + return _SH._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_4_1___call__(self, i, j) + val = property(_SH._Matx_int_4_1_val_get, _SH._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_4_1_swiginit(self, _SH.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _SH: +_SH._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _SH._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _SH._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _SH._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _SH._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _SH._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _SH._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_4_all(alpha) + + def mul(self, v): + return _SH._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_4_swiginit(self, _SH.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_4 + +# Register _Vec_int_4 in _SH: +_SH._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _SH._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_4_generic_type + channels = _SH._DataType_Vec_int_4_channels + fmt = _SH._DataType_Vec_int_4_fmt + + def __init__(self): + _SH._DataType_Vec_int_4_swiginit(self, _SH.new__DataType_Vec_int_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _SH: +_SH._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_6_1_rows + cols = _SH._Matx_int_6_1_cols + channels = _SH._Matx_int_6_1_channels + shortdim = _SH._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_6_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_6_1_t(self) + + def mul(self, a): + return _SH._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_6_1___call__(self, i, j) + val = property(_SH._Matx_int_6_1_val_get, _SH._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_6_1_swiginit(self, _SH.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_6_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _SH: +_SH._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _SH._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _SH._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _SH._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _SH._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _SH._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _SH._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_6_all(alpha) + + def mul(self, v): + return _SH._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_6_swiginit(self, _SH.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_6___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_6 + +# Register _Vec_int_6 in _SH: +_SH._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _SH._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_6_generic_type + channels = _SH._DataType_Vec_int_6_channels + fmt = _SH._DataType_Vec_int_6_fmt + + def __init__(self): + _SH._DataType_Vec_int_6_swiginit(self, _SH.new__DataType_Vec_int_6()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _SH: +_SH._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_8_1_rows + cols = _SH._Matx_int_8_1_cols + channels = _SH._Matx_int_8_1_channels + shortdim = _SH._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_8_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_8_1_t(self) + + def mul(self, a): + return _SH._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_8_1___call__(self, i, j) + val = property(_SH._Matx_int_8_1_val_get, _SH._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_8_1_swiginit(self, _SH.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_8_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _SH: +_SH._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _SH._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _SH._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _SH._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _SH._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _SH._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _SH._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_8_all(alpha) + + def mul(self, v): + return _SH._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_8_swiginit(self, _SH.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_8___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_8 + +# Register _Vec_int_8 in _SH: +_SH._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _SH._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_8_generic_type + channels = _SH._DataType_Vec_int_8_channels + fmt = _SH._DataType_Vec_int_8_fmt + + def __init__(self): + _SH._DataType_Vec_int_8_swiginit(self, _SH.new__DataType_Vec_int_8()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _SH: +_SH._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_float_value + + def __init__(self): + _SH._cv_numpy_sizeof_float_swiginit(self, _SH.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _SH: +_SH._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.floatArray___nonzero__(self) + + def __bool__(self): + return _SH.floatArray___bool__(self) + + def __len__(self): + return _SH.floatArray___len__(self) + + def __getslice__(self, i, j): + return _SH.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.floatArray___setitem__(self, *args) + + def pop(self): + return _SH.floatArray_pop(self) + + def append(self, x): + return _SH.floatArray_append(self, x) + + def empty(self): + return _SH.floatArray_empty(self) + + def size(self): + return _SH.floatArray_size(self) + + def swap(self, v): + return _SH.floatArray_swap(self, v) + + def begin(self): + return _SH.floatArray_begin(self) + + def end(self): + return _SH.floatArray_end(self) + + def rbegin(self): + return _SH.floatArray_rbegin(self) + + def rend(self): + return _SH.floatArray_rend(self) + + def clear(self): + return _SH.floatArray_clear(self) + + def get_allocator(self): + return _SH.floatArray_get_allocator(self) + + def pop_back(self): + return _SH.floatArray_pop_back(self) + + def erase(self, *args): + return _SH.floatArray_erase(self, *args) + + def __init__(self, *args): + _SH.floatArray_swiginit(self, _SH.new_floatArray(*args)) + + def push_back(self, x): + return _SH.floatArray_push_back(self, x) + + def front(self): + return _SH.floatArray_front(self) + + def back(self): + return _SH.floatArray_back(self) + + def assign(self, n, x): + return _SH.floatArray_assign(self, n, x) + + def resize(self, *args): + return _SH.floatArray_resize(self, *args) + + def insert(self, *args): + return _SH.floatArray_insert(self, *args) + + def reserve(self, n): + return _SH.floatArray_reserve(self, n) + + def capacity(self): + return _SH.floatArray_capacity(self) + __swig_destroy__ = _SH.delete_floatArray + +# Register floatArray in _SH: +_SH.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_2_1_rows + cols = _SH._Matx_float_2_1_cols + channels = _SH._Matx_float_2_1_channels + shortdim = _SH._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_float_2_1_t(self) + + def mul(self, a): + return _SH._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_2_1___call__(self, i, j) + val = property(_SH._Matx_float_2_1_val_get, _SH._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_2_1_swiginit(self, _SH.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _SH: +_SH._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _SH._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _SH._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _SH._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _SH._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _SH._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _SH._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_float_2_all(alpha) + + def mul(self, v): + return _SH._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_float_2_swiginit(self, _SH.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_float_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_float_2 + +# Register _Vec_float_2 in _SH: +_SH._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _SH._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_float_2_generic_type + channels = _SH._DataType_Vec_float_2_channels + fmt = _SH._DataType_Vec_float_2_fmt + + def __init__(self): + _SH._DataType_Vec_float_2_swiginit(self, _SH.new__DataType_Vec_float_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _SH: +_SH._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_3_1_rows + cols = _SH._Matx_float_3_1_cols + channels = _SH._Matx_float_3_1_channels + shortdim = _SH._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_float_3_1_t(self) + + def mul(self, a): + return _SH._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_3_1___call__(self, i, j) + val = property(_SH._Matx_float_3_1_val_get, _SH._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_3_1_swiginit(self, _SH.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _SH: +_SH._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _SH._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _SH._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _SH._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _SH._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _SH._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _SH._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_float_3_all(alpha) + + def mul(self, v): + return _SH._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_float_3_swiginit(self, _SH.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_float_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_float_3 + +# Register _Vec_float_3 in _SH: +_SH._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _SH._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_float_3_generic_type + channels = _SH._DataType_Vec_float_3_channels + fmt = _SH._DataType_Vec_float_3_fmt + + def __init__(self): + _SH._DataType_Vec_float_3_swiginit(self, _SH.new__DataType_Vec_float_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _SH: +_SH._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_4_1_rows + cols = _SH._Matx_float_4_1_cols + channels = _SH._Matx_float_4_1_channels + shortdim = _SH._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_float_4_1_t(self) + + def mul(self, a): + return _SH._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_4_1___call__(self, i, j) + val = property(_SH._Matx_float_4_1_val_get, _SH._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_4_1_swiginit(self, _SH.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _SH: +_SH._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _SH._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _SH._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _SH._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _SH._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _SH._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _SH._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_float_4_all(alpha) + + def mul(self, v): + return _SH._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_float_4_swiginit(self, _SH.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_float_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_float_4 + +# Register _Vec_float_4 in _SH: +_SH._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _SH._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_float_4_generic_type + channels = _SH._DataType_Vec_float_4_channels + fmt = _SH._DataType_Vec_float_4_fmt + + def __init__(self): + _SH._DataType_Vec_float_4_swiginit(self, _SH.new__DataType_Vec_float_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _SH: +_SH._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_6_1_rows + cols = _SH._Matx_float_6_1_cols + channels = _SH._Matx_float_6_1_channels + shortdim = _SH._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_6_1_ddot(self, v) + + def t(self): + return _SH._Matx_float_6_1_t(self) + + def mul(self, a): + return _SH._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _SH._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_6_1___call__(self, i, j) + val = property(_SH._Matx_float_6_1_val_get, _SH._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_6_1_swiginit(self, _SH.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_6_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _SH: +_SH._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _SH._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _SH._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _SH._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _SH._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _SH._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _SH._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _SH._Vec_float_6_all(alpha) + + def mul(self, v): + return _SH._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _SH._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_float_6_swiginit(self, _SH.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_float_6___str__(self) + __swig_destroy__ = _SH.delete__Vec_float_6 + +# Register _Vec_float_6 in _SH: +_SH._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _SH._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_float_6_generic_type + channels = _SH._DataType_Vec_float_6_channels + fmt = _SH._DataType_Vec_float_6_fmt + + def __init__(self): + _SH._DataType_Vec_float_6_swiginit(self, _SH.new__DataType_Vec_float_6()) + __swig_destroy__ = _SH.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _SH: +_SH._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_double_value + + def __init__(self): + _SH._cv_numpy_sizeof_double_swiginit(self, _SH.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _SH: +_SH._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.doubleArray___nonzero__(self) + + def __bool__(self): + return _SH.doubleArray___bool__(self) + + def __len__(self): + return _SH.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _SH.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.doubleArray___setitem__(self, *args) + + def pop(self): + return _SH.doubleArray_pop(self) + + def append(self, x): + return _SH.doubleArray_append(self, x) + + def empty(self): + return _SH.doubleArray_empty(self) + + def size(self): + return _SH.doubleArray_size(self) + + def swap(self, v): + return _SH.doubleArray_swap(self, v) + + def begin(self): + return _SH.doubleArray_begin(self) + + def end(self): + return _SH.doubleArray_end(self) + + def rbegin(self): + return _SH.doubleArray_rbegin(self) + + def rend(self): + return _SH.doubleArray_rend(self) + + def clear(self): + return _SH.doubleArray_clear(self) + + def get_allocator(self): + return _SH.doubleArray_get_allocator(self) + + def pop_back(self): + return _SH.doubleArray_pop_back(self) + + def erase(self, *args): + return _SH.doubleArray_erase(self, *args) + + def __init__(self, *args): + _SH.doubleArray_swiginit(self, _SH.new_doubleArray(*args)) + + def push_back(self, x): + return _SH.doubleArray_push_back(self, x) + + def front(self): + return _SH.doubleArray_front(self) + + def back(self): + return _SH.doubleArray_back(self) + + def assign(self, n, x): + return _SH.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _SH.doubleArray_resize(self, *args) + + def insert(self, *args): + return _SH.doubleArray_insert(self, *args) + + def reserve(self, n): + return _SH.doubleArray_reserve(self, n) + + def capacity(self): + return _SH.doubleArray_capacity(self) + __swig_destroy__ = _SH.delete_doubleArray + +# Register doubleArray in _SH: +_SH.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_2_1_rows + cols = _SH._Matx_double_2_1_cols + channels = _SH._Matx_double_2_1_channels + shortdim = _SH._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_double_2_1_t(self) + + def mul(self, a): + return _SH._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_2_1___call__(self, i, j) + val = property(_SH._Matx_double_2_1_val_get, _SH._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_2_1_swiginit(self, _SH.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _SH: +_SH._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _SH._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _SH._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _SH._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _SH._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _SH._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _SH._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_double_2_all(alpha) + + def mul(self, v): + return _SH._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_double_2_swiginit(self, _SH.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_double_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_double_2 + +# Register _Vec_double_2 in _SH: +_SH._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _SH._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_double_2_generic_type + channels = _SH._DataType_Vec_double_2_channels + fmt = _SH._DataType_Vec_double_2_fmt + + def __init__(self): + _SH._DataType_Vec_double_2_swiginit(self, _SH.new__DataType_Vec_double_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _SH: +_SH._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_3_1_rows + cols = _SH._Matx_double_3_1_cols + channels = _SH._Matx_double_3_1_channels + shortdim = _SH._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_double_3_1_t(self) + + def mul(self, a): + return _SH._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_3_1___call__(self, i, j) + val = property(_SH._Matx_double_3_1_val_get, _SH._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_3_1_swiginit(self, _SH.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _SH: +_SH._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _SH._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _SH._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _SH._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _SH._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _SH._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _SH._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_double_3_all(alpha) + + def mul(self, v): + return _SH._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_double_3_swiginit(self, _SH.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_double_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_double_3 + +# Register _Vec_double_3 in _SH: +_SH._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _SH._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_double_3_generic_type + channels = _SH._DataType_Vec_double_3_channels + fmt = _SH._DataType_Vec_double_3_fmt + + def __init__(self): + _SH._DataType_Vec_double_3_swiginit(self, _SH.new__DataType_Vec_double_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _SH: +_SH._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_4_1_rows + cols = _SH._Matx_double_4_1_cols + channels = _SH._Matx_double_4_1_channels + shortdim = _SH._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_double_4_1_t(self) + + def mul(self, a): + return _SH._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_4_1___call__(self, i, j) + val = property(_SH._Matx_double_4_1_val_get, _SH._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_4_1_swiginit(self, _SH.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _SH: +_SH._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _SH._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _SH._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _SH._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _SH._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _SH._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _SH._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_double_4_all(alpha) + + def mul(self, v): + return _SH._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_double_4_swiginit(self, _SH.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_double_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_double_4 + +# Register _Vec_double_4 in _SH: +_SH._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _SH._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_double_4_generic_type + channels = _SH._DataType_Vec_double_4_channels + fmt = _SH._DataType_Vec_double_4_fmt + + def __init__(self): + _SH._DataType_Vec_double_4_swiginit(self, _SH.new__DataType_Vec_double_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _SH: +_SH._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_6_1_rows + cols = _SH._Matx_double_6_1_cols + channels = _SH._Matx_double_6_1_channels + shortdim = _SH._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_6_1_ddot(self, v) + + def t(self): + return _SH._Matx_double_6_1_t(self) + + def mul(self, a): + return _SH._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _SH._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_6_1___call__(self, i, j) + val = property(_SH._Matx_double_6_1_val_get, _SH._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_6_1_swiginit(self, _SH.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_6_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _SH: +_SH._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _SH._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _SH._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _SH._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _SH._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _SH._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _SH._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _SH._Vec_double_6_all(alpha) + + def mul(self, v): + return _SH._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _SH._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_double_6_swiginit(self, _SH.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_double_6___str__(self) + __swig_destroy__ = _SH.delete__Vec_double_6 + +# Register _Vec_double_6 in _SH: +_SH._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _SH._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_double_6_generic_type + channels = _SH._DataType_Vec_double_6_channels + fmt = _SH._DataType_Vec_double_6_fmt + + def __init__(self): + _SH._DataType_Vec_double_6_swiginit(self, _SH.new__DataType_Vec_double_6()) + __swig_destroy__ = _SH.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _SH: +_SH._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH._mat__np_array_constructor_swiginit(self, _SH.new__mat__np_array_constructor()) + __swig_destroy__ = _SH.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _SH: +_SH._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _SH._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _SH._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_uchar_value + + def __init__(self): + _SH._cv_numpy_sizeof_uchar_swiginit(self, _SH.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _SH: +_SH._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__uchar_create(self, *args) + + def cross(self, m): + return _SH._Mat__uchar_cross(self, m) + + def row(self, y): + return _SH._Mat__uchar_row(self, y) + + def col(self, x): + return _SH._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _SH._Mat__uchar_diag(self, d) + + def clone(self): + return _SH._Mat__uchar_clone(self) + + def elemSize(self): + return _SH._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _SH._Mat__uchar_elemSize1(self) + + def type(self): + return _SH._Mat__uchar_type(self) + + def depth(self): + return _SH._Mat__uchar_depth(self) + + def channels(self): + return _SH._Mat__uchar_channels(self) + + def step1(self, i=0): + return _SH._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__uchar_swiginit(self, _SH.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__uchar___str__(self) + __swig_destroy__ = _SH.delete__Mat__uchar + +# Register _Mat__uchar in _SH: +_SH._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2b_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _SH: +_SH._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2b_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2b_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2b_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2b_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2b_type(self) + + def depth(self): + return _SH._Mat__Vec2b_depth(self) + + def channels(self): + return _SH._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2b_swiginit(self, _SH.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2b___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _SH: +_SH._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3b_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _SH: +_SH._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3b_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3b_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3b_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3b_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3b_type(self) + + def depth(self): + return _SH._Mat__Vec3b_depth(self) + + def channels(self): + return _SH._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3b_swiginit(self, _SH.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3b___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _SH: +_SH._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4b_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _SH: +_SH._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4b_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4b_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4b_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4b_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4b_type(self) + + def depth(self): + return _SH._Mat__Vec4b_depth(self) + + def channels(self): + return _SH._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4b_swiginit(self, _SH.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4b___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _SH: +_SH._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__short_create(self, *args) + + def cross(self, m): + return _SH._Mat__short_cross(self, m) + + def row(self, y): + return _SH._Mat__short_row(self, y) + + def col(self, x): + return _SH._Mat__short_col(self, x) + + def diag(self, d=0): + return _SH._Mat__short_diag(self, d) + + def clone(self): + return _SH._Mat__short_clone(self) + + def elemSize(self): + return _SH._Mat__short_elemSize(self) + + def elemSize1(self): + return _SH._Mat__short_elemSize1(self) + + def type(self): + return _SH._Mat__short_type(self) + + def depth(self): + return _SH._Mat__short_depth(self) + + def channels(self): + return _SH._Mat__short_channels(self) + + def step1(self, i=0): + return _SH._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__short___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__short_swiginit(self, _SH.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__short___str__(self) + __swig_destroy__ = _SH.delete__Mat__short + +# Register _Mat__short in _SH: +_SH._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2s_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _SH: +_SH._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2s_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2s_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2s_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2s_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2s_type(self) + + def depth(self): + return _SH._Mat__Vec2s_depth(self) + + def channels(self): + return _SH._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2s_swiginit(self, _SH.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2s___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _SH: +_SH._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3s_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _SH: +_SH._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3s_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3s_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3s_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3s_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3s_type(self) + + def depth(self): + return _SH._Mat__Vec3s_depth(self) + + def channels(self): + return _SH._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3s_swiginit(self, _SH.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3s___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _SH: +_SH._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4s_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _SH: +_SH._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4s_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4s_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4s_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4s_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4s_type(self) + + def depth(self): + return _SH._Mat__Vec4s_depth(self) + + def channels(self): + return _SH._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4s_swiginit(self, _SH.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4s___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _SH: +_SH._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__ushort_create(self, *args) + + def cross(self, m): + return _SH._Mat__ushort_cross(self, m) + + def row(self, y): + return _SH._Mat__ushort_row(self, y) + + def col(self, x): + return _SH._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _SH._Mat__ushort_diag(self, d) + + def clone(self): + return _SH._Mat__ushort_clone(self) + + def elemSize(self): + return _SH._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _SH._Mat__ushort_elemSize1(self) + + def type(self): + return _SH._Mat__ushort_type(self) + + def depth(self): + return _SH._Mat__ushort_depth(self) + + def channels(self): + return _SH._Mat__ushort_channels(self) + + def step1(self, i=0): + return _SH._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__ushort_swiginit(self, _SH.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__ushort___str__(self) + __swig_destroy__ = _SH.delete__Mat__ushort + +# Register _Mat__ushort in _SH: +_SH._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2w_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _SH: +_SH._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2w_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2w_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2w_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2w_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2w_type(self) + + def depth(self): + return _SH._Mat__Vec2w_depth(self) + + def channels(self): + return _SH._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2w_swiginit(self, _SH.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2w___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _SH: +_SH._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3w_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _SH: +_SH._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3w_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3w_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3w_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3w_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3w_type(self) + + def depth(self): + return _SH._Mat__Vec3w_depth(self) + + def channels(self): + return _SH._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3w_swiginit(self, _SH.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3w___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _SH: +_SH._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4w_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _SH: +_SH._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4w_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4w_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4w_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4w_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4w_type(self) + + def depth(self): + return _SH._Mat__Vec4w_depth(self) + + def channels(self): + return _SH._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4w_swiginit(self, _SH.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4w___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _SH: +_SH._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__int_create(self, *args) + + def cross(self, m): + return _SH._Mat__int_cross(self, m) + + def row(self, y): + return _SH._Mat__int_row(self, y) + + def col(self, x): + return _SH._Mat__int_col(self, x) + + def diag(self, d=0): + return _SH._Mat__int_diag(self, d) + + def clone(self): + return _SH._Mat__int_clone(self) + + def elemSize(self): + return _SH._Mat__int_elemSize(self) + + def elemSize1(self): + return _SH._Mat__int_elemSize1(self) + + def type(self): + return _SH._Mat__int_type(self) + + def depth(self): + return _SH._Mat__int_depth(self) + + def channels(self): + return _SH._Mat__int_channels(self) + + def step1(self, i=0): + return _SH._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__int___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__int_swiginit(self, _SH.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__int___str__(self) + __swig_destroy__ = _SH.delete__Mat__int + +# Register _Mat__int in _SH: +_SH._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2i_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _SH: +_SH._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2i_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2i_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2i_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2i_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2i_type(self) + + def depth(self): + return _SH._Mat__Vec2i_depth(self) + + def channels(self): + return _SH._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2i_swiginit(self, _SH.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2i___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _SH: +_SH._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3i_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _SH: +_SH._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3i_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3i_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3i_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3i_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3i_type(self) + + def depth(self): + return _SH._Mat__Vec3i_depth(self) + + def channels(self): + return _SH._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3i_swiginit(self, _SH.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3i___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _SH: +_SH._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4i_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _SH: +_SH._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4i_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4i_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4i_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4i_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4i_type(self) + + def depth(self): + return _SH._Mat__Vec4i_depth(self) + + def channels(self): + return _SH._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4i_swiginit(self, _SH.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4i___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _SH: +_SH._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__float_create(self, *args) + + def cross(self, m): + return _SH._Mat__float_cross(self, m) + + def row(self, y): + return _SH._Mat__float_row(self, y) + + def col(self, x): + return _SH._Mat__float_col(self, x) + + def diag(self, d=0): + return _SH._Mat__float_diag(self, d) + + def clone(self): + return _SH._Mat__float_clone(self) + + def elemSize(self): + return _SH._Mat__float_elemSize(self) + + def elemSize1(self): + return _SH._Mat__float_elemSize1(self) + + def type(self): + return _SH._Mat__float_type(self) + + def depth(self): + return _SH._Mat__float_depth(self) + + def channels(self): + return _SH._Mat__float_channels(self) + + def step1(self, i=0): + return _SH._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__float___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__float_swiginit(self, _SH.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__float___str__(self) + __swig_destroy__ = _SH.delete__Mat__float + +# Register _Mat__float in _SH: +_SH._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2f_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _SH: +_SH._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2f_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2f_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2f_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2f_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2f_type(self) + + def depth(self): + return _SH._Mat__Vec2f_depth(self) + + def channels(self): + return _SH._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2f_swiginit(self, _SH.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2f___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _SH: +_SH._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3f_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _SH: +_SH._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3f_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3f_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3f_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3f_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3f_type(self) + + def depth(self): + return _SH._Mat__Vec3f_depth(self) + + def channels(self): + return _SH._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3f_swiginit(self, _SH.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3f___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _SH: +_SH._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4f_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _SH: +_SH._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4f_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4f_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4f_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4f_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4f_type(self) + + def depth(self): + return _SH._Mat__Vec4f_depth(self) + + def channels(self): + return _SH._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4f_swiginit(self, _SH.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4f___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _SH: +_SH._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__double_create(self, *args) + + def cross(self, m): + return _SH._Mat__double_cross(self, m) + + def row(self, y): + return _SH._Mat__double_row(self, y) + + def col(self, x): + return _SH._Mat__double_col(self, x) + + def diag(self, d=0): + return _SH._Mat__double_diag(self, d) + + def clone(self): + return _SH._Mat__double_clone(self) + + def elemSize(self): + return _SH._Mat__double_elemSize(self) + + def elemSize1(self): + return _SH._Mat__double_elemSize1(self) + + def type(self): + return _SH._Mat__double_type(self) + + def depth(self): + return _SH._Mat__double_depth(self) + + def channels(self): + return _SH._Mat__double_channels(self) + + def step1(self, i=0): + return _SH._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__double___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__double_swiginit(self, _SH.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__double___str__(self) + __swig_destroy__ = _SH.delete__Mat__double + +# Register _Mat__double in _SH: +_SH._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2d_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _SH: +_SH._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2d_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2d_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2d_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2d_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2d_type(self) + + def depth(self): + return _SH._Mat__Vec2d_depth(self) + + def channels(self): + return _SH._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2d_swiginit(self, _SH.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2d___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _SH: +_SH._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3d_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _SH: +_SH._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3d_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3d_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3d_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3d_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3d_type(self) + + def depth(self): + return _SH._Mat__Vec3d_depth(self) + + def channels(self): + return _SH._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3d_swiginit(self, _SH.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3d___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _SH: +_SH._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4d_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _SH: +_SH._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4d_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4d_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4d_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4d_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4d_type(self) + + def depth(self): + return _SH._Mat__Vec4d_depth(self) + + def channels(self): + return _SH._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4d_swiginit(self, _SH.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4d___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _SH: +_SH._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_1_2_rows + cols = _SH._Matx_float_1_2_cols + channels = _SH._Matx_float_1_2_channels + shortdim = _SH._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_1_2_ddot(self, v) + + def t(self): + return _SH._Matx_float_1_2_t(self) + + def mul(self, a): + return _SH._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _SH._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_1_2___call__(self, i, j) + val = property(_SH._Matx_float_1_2_val_get, _SH._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_1_2_swiginit(self, _SH.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_1_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _SH: +_SH._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _SH._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _SH._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _SH._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _SH._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _SH._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _SH._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_1_2_rows + cols = _SH._Matx_double_1_2_cols + channels = _SH._Matx_double_1_2_channels + shortdim = _SH._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_1_2_ddot(self, v) + + def t(self): + return _SH._Matx_double_1_2_t(self) + + def mul(self, a): + return _SH._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _SH._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_1_2___call__(self, i, j) + val = property(_SH._Matx_double_1_2_val_get, _SH._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_1_2_swiginit(self, _SH.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_1_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _SH: +_SH._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _SH._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _SH._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _SH._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _SH._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _SH._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _SH._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_1_3_rows + cols = _SH._Matx_float_1_3_cols + channels = _SH._Matx_float_1_3_channels + shortdim = _SH._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_1_3_ddot(self, v) + + def t(self): + return _SH._Matx_float_1_3_t(self) + + def mul(self, a): + return _SH._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _SH._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_1_3___call__(self, i, j) + val = property(_SH._Matx_float_1_3_val_get, _SH._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_1_3_swiginit(self, _SH.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_1_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _SH: +_SH._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _SH._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _SH._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _SH._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _SH._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _SH._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _SH._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_1_3_rows + cols = _SH._Matx_double_1_3_cols + channels = _SH._Matx_double_1_3_channels + shortdim = _SH._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_1_3_ddot(self, v) + + def t(self): + return _SH._Matx_double_1_3_t(self) + + def mul(self, a): + return _SH._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _SH._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_1_3___call__(self, i, j) + val = property(_SH._Matx_double_1_3_val_get, _SH._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_1_3_swiginit(self, _SH.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_1_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _SH: +_SH._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _SH._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _SH._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _SH._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _SH._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _SH._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _SH._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_1_4_rows + cols = _SH._Matx_float_1_4_cols + channels = _SH._Matx_float_1_4_channels + shortdim = _SH._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_1_4_ddot(self, v) + + def t(self): + return _SH._Matx_float_1_4_t(self) + + def mul(self, a): + return _SH._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _SH._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_1_4___call__(self, i, j) + val = property(_SH._Matx_float_1_4_val_get, _SH._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_1_4_swiginit(self, _SH.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_1_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _SH: +_SH._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _SH._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _SH._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _SH._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _SH._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _SH._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _SH._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_1_4_rows + cols = _SH._Matx_double_1_4_cols + channels = _SH._Matx_double_1_4_channels + shortdim = _SH._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_1_4_ddot(self, v) + + def t(self): + return _SH._Matx_double_1_4_t(self) + + def mul(self, a): + return _SH._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _SH._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_1_4___call__(self, i, j) + val = property(_SH._Matx_double_1_4_val_get, _SH._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_1_4_swiginit(self, _SH.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_1_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _SH: +_SH._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _SH._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _SH._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _SH._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _SH._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _SH._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _SH._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_1_6_rows + cols = _SH._Matx_float_1_6_cols + channels = _SH._Matx_float_1_6_channels + shortdim = _SH._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_1_6_ddot(self, v) + + def t(self): + return _SH._Matx_float_1_6_t(self) + + def mul(self, a): + return _SH._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _SH._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_1_6___call__(self, i, j) + val = property(_SH._Matx_float_1_6_val_get, _SH._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_1_6_swiginit(self, _SH.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_1_6___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _SH: +_SH._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _SH._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _SH._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _SH._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _SH._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _SH._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _SH._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_1_6_rows + cols = _SH._Matx_double_1_6_cols + channels = _SH._Matx_double_1_6_channels + shortdim = _SH._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_1_6_ddot(self, v) + + def t(self): + return _SH._Matx_double_1_6_t(self) + + def mul(self, a): + return _SH._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _SH._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_1_6___call__(self, i, j) + val = property(_SH._Matx_double_1_6_val_get, _SH._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_1_6_swiginit(self, _SH.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_1_6___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _SH: +_SH._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _SH._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _SH._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _SH._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _SH._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _SH._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _SH._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_2_2_rows + cols = _SH._Matx_float_2_2_cols + channels = _SH._Matx_float_2_2_channels + shortdim = _SH._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_2_2_ddot(self, v) + + def t(self): + return _SH._Matx_float_2_2_t(self) + + def mul(self, a): + return _SH._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _SH._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_2_2___call__(self, i, j) + val = property(_SH._Matx_float_2_2_val_get, _SH._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_2_2_swiginit(self, _SH.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_2_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _SH: +_SH._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _SH._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _SH._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _SH._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _SH._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _SH._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _SH._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_2_2_rows + cols = _SH._Matx_double_2_2_cols + channels = _SH._Matx_double_2_2_channels + shortdim = _SH._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_2_2_ddot(self, v) + + def t(self): + return _SH._Matx_double_2_2_t(self) + + def mul(self, a): + return _SH._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _SH._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_2_2___call__(self, i, j) + val = property(_SH._Matx_double_2_2_val_get, _SH._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_2_2_swiginit(self, _SH.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_2_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _SH: +_SH._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _SH._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _SH._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _SH._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _SH._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _SH._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _SH._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_2_3_rows + cols = _SH._Matx_float_2_3_cols + channels = _SH._Matx_float_2_3_channels + shortdim = _SH._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_2_3_ddot(self, v) + + def t(self): + return _SH._Matx_float_2_3_t(self) + + def mul(self, a): + return _SH._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _SH._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_2_3___call__(self, i, j) + val = property(_SH._Matx_float_2_3_val_get, _SH._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_2_3_swiginit(self, _SH.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_2_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _SH: +_SH._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _SH._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _SH._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _SH._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _SH._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _SH._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _SH._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_2_3_rows + cols = _SH._Matx_double_2_3_cols + channels = _SH._Matx_double_2_3_channels + shortdim = _SH._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_2_3_ddot(self, v) + + def t(self): + return _SH._Matx_double_2_3_t(self) + + def mul(self, a): + return _SH._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _SH._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_2_3___call__(self, i, j) + val = property(_SH._Matx_double_2_3_val_get, _SH._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_2_3_swiginit(self, _SH.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_2_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _SH: +_SH._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _SH._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _SH._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _SH._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _SH._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _SH._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _SH._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_3_2_rows + cols = _SH._Matx_float_3_2_cols + channels = _SH._Matx_float_3_2_channels + shortdim = _SH._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_3_2_ddot(self, v) + + def t(self): + return _SH._Matx_float_3_2_t(self) + + def mul(self, a): + return _SH._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _SH._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_3_2___call__(self, i, j) + val = property(_SH._Matx_float_3_2_val_get, _SH._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_3_2_swiginit(self, _SH.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_3_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _SH: +_SH._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _SH._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _SH._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _SH._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _SH._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _SH._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _SH._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_3_2_rows + cols = _SH._Matx_double_3_2_cols + channels = _SH._Matx_double_3_2_channels + shortdim = _SH._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_3_2_ddot(self, v) + + def t(self): + return _SH._Matx_double_3_2_t(self) + + def mul(self, a): + return _SH._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _SH._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_3_2___call__(self, i, j) + val = property(_SH._Matx_double_3_2_val_get, _SH._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_3_2_swiginit(self, _SH.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_3_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _SH: +_SH._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _SH._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _SH._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _SH._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _SH._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _SH._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _SH._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_3_3_rows + cols = _SH._Matx_float_3_3_cols + channels = _SH._Matx_float_3_3_channels + shortdim = _SH._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_3_3_ddot(self, v) + + def t(self): + return _SH._Matx_float_3_3_t(self) + + def mul(self, a): + return _SH._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _SH._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_3_3___call__(self, i, j) + val = property(_SH._Matx_float_3_3_val_get, _SH._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_3_3_swiginit(self, _SH.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_3_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _SH: +_SH._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _SH._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _SH._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _SH._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _SH._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _SH._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _SH._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_3_3_rows + cols = _SH._Matx_double_3_3_cols + channels = _SH._Matx_double_3_3_channels + shortdim = _SH._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_3_3_ddot(self, v) + + def t(self): + return _SH._Matx_double_3_3_t(self) + + def mul(self, a): + return _SH._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _SH._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_3_3___call__(self, i, j) + val = property(_SH._Matx_double_3_3_val_get, _SH._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_3_3_swiginit(self, _SH.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_3_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _SH: +_SH._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _SH._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _SH._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _SH._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _SH._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _SH._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _SH._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_3_4_rows + cols = _SH._Matx_float_3_4_cols + channels = _SH._Matx_float_3_4_channels + shortdim = _SH._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_3_4_ddot(self, v) + + def t(self): + return _SH._Matx_float_3_4_t(self) + + def mul(self, a): + return _SH._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _SH._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_3_4___call__(self, i, j) + val = property(_SH._Matx_float_3_4_val_get, _SH._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_3_4_swiginit(self, _SH.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_3_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _SH: +_SH._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _SH._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _SH._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _SH._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _SH._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _SH._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _SH._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_3_4_rows + cols = _SH._Matx_double_3_4_cols + channels = _SH._Matx_double_3_4_channels + shortdim = _SH._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_3_4_ddot(self, v) + + def t(self): + return _SH._Matx_double_3_4_t(self) + + def mul(self, a): + return _SH._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _SH._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_3_4___call__(self, i, j) + val = property(_SH._Matx_double_3_4_val_get, _SH._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_3_4_swiginit(self, _SH.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_3_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _SH: +_SH._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _SH._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _SH._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _SH._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _SH._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _SH._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _SH._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_4_3_rows + cols = _SH._Matx_float_4_3_cols + channels = _SH._Matx_float_4_3_channels + shortdim = _SH._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_4_3_ddot(self, v) + + def t(self): + return _SH._Matx_float_4_3_t(self) + + def mul(self, a): + return _SH._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _SH._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_4_3___call__(self, i, j) + val = property(_SH._Matx_float_4_3_val_get, _SH._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_4_3_swiginit(self, _SH.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_4_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _SH: +_SH._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _SH._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _SH._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _SH._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _SH._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _SH._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _SH._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_4_3_rows + cols = _SH._Matx_double_4_3_cols + channels = _SH._Matx_double_4_3_channels + shortdim = _SH._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_4_3_ddot(self, v) + + def t(self): + return _SH._Matx_double_4_3_t(self) + + def mul(self, a): + return _SH._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _SH._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_4_3___call__(self, i, j) + val = property(_SH._Matx_double_4_3_val_get, _SH._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_4_3_swiginit(self, _SH.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_4_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _SH: +_SH._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _SH._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _SH._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _SH._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _SH._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _SH._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _SH._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_4_4_rows + cols = _SH._Matx_float_4_4_cols + channels = _SH._Matx_float_4_4_channels + shortdim = _SH._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_4_4_ddot(self, v) + + def t(self): + return _SH._Matx_float_4_4_t(self) + + def mul(self, a): + return _SH._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _SH._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_4_4___call__(self, i, j) + val = property(_SH._Matx_float_4_4_val_get, _SH._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_4_4_swiginit(self, _SH.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_4_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _SH: +_SH._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _SH._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _SH._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _SH._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _SH._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _SH._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _SH._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_4_4_rows + cols = _SH._Matx_double_4_4_cols + channels = _SH._Matx_double_4_4_channels + shortdim = _SH._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_4_4_ddot(self, v) + + def t(self): + return _SH._Matx_double_4_4_t(self) + + def mul(self, a): + return _SH._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _SH._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_4_4___call__(self, i, j) + val = property(_SH._Matx_double_4_4_val_get, _SH._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_4_4_swiginit(self, _SH.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_4_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _SH: +_SH._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _SH._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _SH._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _SH._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _SH._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _SH._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _SH._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_6_6_rows + cols = _SH._Matx_float_6_6_cols + channels = _SH._Matx_float_6_6_channels + shortdim = _SH._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_6_6_ddot(self, v) + + def t(self): + return _SH._Matx_float_6_6_t(self) + + def mul(self, a): + return _SH._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _SH._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_6_6___call__(self, i, j) + val = property(_SH._Matx_float_6_6_val_get, _SH._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_6_6_swiginit(self, _SH.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_6_6___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _SH: +_SH._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _SH._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _SH._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _SH._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _SH._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _SH._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _SH._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_6_6_rows + cols = _SH._Matx_double_6_6_cols + channels = _SH._Matx_double_6_6_channels + shortdim = _SH._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_6_6_ddot(self, v) + + def t(self): + return _SH._Matx_double_6_6_t(self) + + def mul(self, a): + return _SH._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _SH._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_6_6___call__(self, i, j) + val = property(_SH._Matx_double_6_6_val_get, _SH._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_6_6_swiginit(self, _SH.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_6_6___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _SH: +_SH._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _SH._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _SH._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _SH._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _SH._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _SH._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _SH._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Point__int_swiginit(self, _SH.new__Point__int(*args)) + + def dot(self, pt): + return _SH._Point__int_dot(self, pt) + + def ddot(self, pt): + return _SH._Point__int_ddot(self, pt) + + def cross(self, pt): + return _SH._Point__int_cross(self, pt) + x = property(_SH._Point__int_x_get, _SH._Point__int_x_set) + y = property(_SH._Point__int_y_get, _SH._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _SH._Point__int___str__(self) + __swig_destroy__ = _SH.delete__Point__int + +# Register _Point__int in _SH: +_SH._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Point__float_swiginit(self, _SH.new__Point__float(*args)) + + def dot(self, pt): + return _SH._Point__float_dot(self, pt) + + def ddot(self, pt): + return _SH._Point__float_ddot(self, pt) + + def cross(self, pt): + return _SH._Point__float_cross(self, pt) + x = property(_SH._Point__float_x_get, _SH._Point__float_x_set) + y = property(_SH._Point__float_y_get, _SH._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _SH._Point__float___str__(self) + __swig_destroy__ = _SH.delete__Point__float + +# Register _Point__float in _SH: +_SH._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Point__double_swiginit(self, _SH.new__Point__double(*args)) + + def dot(self, pt): + return _SH._Point__double_dot(self, pt) + + def ddot(self, pt): + return _SH._Point__double_ddot(self, pt) + + def cross(self, pt): + return _SH._Point__double_cross(self, pt) + x = property(_SH._Point__double_x_get, _SH._Point__double_x_set) + y = property(_SH._Point__double_y_get, _SH._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _SH._Point__double___str__(self) + __swig_destroy__ = _SH.delete__Point__double + +# Register _Point__double in _SH: +_SH._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Rect__int_swiginit(self, _SH.new__Rect__int(*args)) + + def tl(self): + return _SH._Rect__int_tl(self) + + def br(self): + return _SH._Rect__int_br(self) + + def size(self): + return _SH._Rect__int_size(self) + + def area(self): + return _SH._Rect__int_area(self) + + def contains(self, pt): + return _SH._Rect__int_contains(self, pt) + x = property(_SH._Rect__int_x_get, _SH._Rect__int_x_set) + y = property(_SH._Rect__int_y_get, _SH._Rect__int_y_set) + width = property(_SH._Rect__int_width_get, _SH._Rect__int_width_set) + height = property(_SH._Rect__int_height_get, _SH._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _SH._Rect__int___str__(self) + __swig_destroy__ = _SH.delete__Rect__int + +# Register _Rect__int in _SH: +_SH._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Rect__float_swiginit(self, _SH.new__Rect__float(*args)) + + def tl(self): + return _SH._Rect__float_tl(self) + + def br(self): + return _SH._Rect__float_br(self) + + def size(self): + return _SH._Rect__float_size(self) + + def area(self): + return _SH._Rect__float_area(self) + + def contains(self, pt): + return _SH._Rect__float_contains(self, pt) + x = property(_SH._Rect__float_x_get, _SH._Rect__float_x_set) + y = property(_SH._Rect__float_y_get, _SH._Rect__float_y_set) + width = property(_SH._Rect__float_width_get, _SH._Rect__float_width_set) + height = property(_SH._Rect__float_height_get, _SH._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _SH._Rect__float___str__(self) + __swig_destroy__ = _SH.delete__Rect__float + +# Register _Rect__float in _SH: +_SH._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Rect__double_swiginit(self, _SH.new__Rect__double(*args)) + + def tl(self): + return _SH._Rect__double_tl(self) + + def br(self): + return _SH._Rect__double_br(self) + + def size(self): + return _SH._Rect__double_size(self) + + def area(self): + return _SH._Rect__double_area(self) + + def contains(self, pt): + return _SH._Rect__double_contains(self, pt) + x = property(_SH._Rect__double_x_get, _SH._Rect__double_x_set) + y = property(_SH._Rect__double_y_get, _SH._Rect__double_y_set) + width = property(_SH._Rect__double_width_get, _SH._Rect__double_width_set) + height = property(_SH._Rect__double_height_get, _SH._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _SH._Rect__double___str__(self) + __swig_destroy__ = _SH.delete__Rect__double + +# Register _Rect__double in _SH: +_SH._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Scalar__double_swiginit(self, _SH.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _SH._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _SH._Scalar__double_mul(self, a, scale) + + def conj(self): + return _SH._Scalar__double_conj(self) + + def isReal(self): + return _SH._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Scalar__double___str__(self) + __swig_destroy__ = _SH.delete__Scalar__double + +# Register _Scalar__double in _SH: +_SH._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _SH._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Size__int_swiginit(self, _SH.new__Size__int(*args)) + + def area(self): + return _SH._Size__int_area(self) + width = property(_SH._Size__int_width_get, _SH._Size__int_width_set) + height = property(_SH._Size__int_height_get, _SH._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _SH._Size__int___str__(self) + __swig_destroy__ = _SH.delete__Size__int + +# Register _Size__int in _SH: +_SH._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Size__float_swiginit(self, _SH.new__Size__float(*args)) + + def area(self): + return _SH._Size__float_area(self) + width = property(_SH._Size__float_width_get, _SH._Size__float_width_set) + height = property(_SH._Size__float_height_get, _SH._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _SH._Size__float___str__(self) + __swig_destroy__ = _SH.delete__Size__float + +# Register _Size__float in _SH: +_SH._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Size__double_swiginit(self, _SH.new__Size__double(*args)) + + def area(self): + return _SH._Size__double_area(self) + width = property(_SH._Size__double_width_get, _SH._Size__double_width_set) + height = property(_SH._Size__double_height_get, _SH._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _SH._Size__double___str__(self) + __swig_destroy__ = _SH.delete__Size__double + +# Register _Size__double in _SH: +_SH._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def SH(file1, file2, outfile): + return _SH.SH(file1, file2, outfile) + + diff --git a/plugins/unsupervised_method/scripts/__init__.py b/plugins/unsupervised_method/scripts/__init__.py new file mode 100644 index 0000000..f0fe433 --- /dev/null +++ b/plugins/unsupervised_method/scripts/__init__.py @@ -0,0 +1,690 @@ +from datetime import datetime +from osgeo import gdal +import math,os +import time +from PyQt5 import QtWidgets +from sklearn.cluster import k_means +from rscder.utils.geomath import geo2imageRC, imageRC2geo +from rscder.utils.project import Project, PairLayer +from misc import Register, AlgFrontend + +UNSUPER_CD = Register('无监督变化检测方法') + +import numpy as np +from .ACD import ACD +from .AHT import AHT +from .OCD import OCD +from .LHBA import LHBA +from .SH import SH + +def warp(file,ds:gdal.Dataset,srcWin=[0,0,0,0]): + driver = gdal.GetDriverByName('GTiff') + xsize=ds.RasterXSize + ysize=ds.RasterYSize + geo=ds.GetGeoTransform() + orj=ds.GetProjection() + band=ds.RasterCount + if os.path.exists(file): + os.remove(file) + out_ds:gdal.Dataset=driver.Create(file, xsize, ysize, band, gdal.GDT_Byte) + out_ds.SetGeoTransform(geo) + out_ds.SetProjection(orj) + for b in range(1,band+1): + out_ds.GetRasterBand(b).WriteArray(ds.ReadAsArray(*srcWin,band_list=[b]),*(0,0)) + del out_ds + +@UNSUPER_CD.register +class BasicCD(AlgFrontend): + + @staticmethod + def get_name(): + return '差分法' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None,*args, **kargs): + + ds1:gdal.Dataset=gdal.Open(pth1) + ds2:gdal.Dataset=gdal.Open(pth2) + + cell_size = layer_parent.cell_size + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + + band = ds1.RasterCount + yblocks = ysize // cell_size[1] + + driver = gdal.GetDriverByName('GTiff') + out_tif = os.path.join(Project().other_path, 'temp.tif') + out_ds = driver.Create(out_tif, xsize, ysize, 1, gdal.GDT_Float32) + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + out_ds.SetGeoTransform(geo) + out_ds.SetProjection(proj) + + max_diff = 0 + min_diff = math.inf + + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + for j in range(yblocks + 1):#该改这里了 + if send_message is not None: + send_message.emit(f'计算{j}/{yblocks}') + block_xy1 = (start1x, start1y+j * cell_size[1]) + block_xy2 = (start2x,start2y+j*cell_size[1]) + block_xy=(0,j * cell_size[1]) + if block_xy1[1] > end1y or block_xy2[1] > end2y: + break + block_size=(xsize, cell_size[1]) + block_size1 = (xsize, cell_size[1]) + block_size2 = (xsize,cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + if block_xy1[1] + block_size1[1] > end1y: + block_size1 = (xsize,end1y - block_xy1[1]) + if block_xy2[1] + block_size2[1] > end2y: + block_size2 = (xsize, end2y - block_xy2[1]) + block_data1 = ds1.ReadAsArray(*block_xy1, *block_size1) + block_data2 = ds2.ReadAsArray(*block_xy2, *block_size2) + + if band == 1: + block_data1 = block_data1[None, ...] + block_data2 = block_data2[None, ...] + # pdb.set_trace() + block_diff = block_data1.sum(0) - block_data2.sum(0) + block_diff = block_diff.astype(np.float32) + block_diff = np.abs(block_diff) + + min_diff = min(min_diff, block_diff[block_diff > 0].min()) + max_diff = max(max_diff, block_diff.max()) + out_ds.GetRasterBand(1).WriteArray(block_diff, *block_xy) + if send_message is not None: + + send_message.emit(f'完成{j}/{yblocks}') + del ds2 + del ds1 + out_ds.FlushCache() + del out_ds + if send_message is not None: + send_message.emit('归一化概率中...') + temp_in_ds = gdal.Open(out_tif) + + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + out_normal_ds = driver.Create(out_normal_tif, xsize, ysize, 1, gdal.GDT_Byte) + out_normal_ds.SetGeoTransform(geo) + out_normal_ds.SetProjection(proj) + # hist = np.zeros(256, dtype=np.int32) + for j in range(yblocks+1): + block_xy = (0, j * cell_size[1]) + if block_xy[1] > ysize: + break + block_size = (xsize, cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + block_data = temp_in_ds.ReadAsArray(*block_xy, *block_size) + block_data = (block_data - min_diff) / (max_diff - min_diff) * 255 + block_data = block_data.astype(np.uint8) + out_normal_ds.GetRasterBand(1).WriteArray(block_data, *block_xy) + # hist_t, _ = np.histogram(block_data, bins=256, range=(0, 256)) + # hist += hist_t + # print(hist) + del temp_in_ds + del out_normal_ds + try: + os.remove(out_tif) + except: + pass + if send_message is not None: + send_message.emit('差分法计算完成') + return out_normal_tif + +@UNSUPER_CD.register +class LSTS(AlgFrontend): + + @staticmethod + def get_name(): + return 'LSTS' + + @staticmethod + def get_widget(parent=None): + + widget = QtWidgets.QWidget(parent) + + return widget + + @staticmethod + def get_params(widget=None): + return dict(n=5, w_size=(3,3)) + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message=None,n=5,w_size=(3,3), *args, **kws): + ds1:gdal.Dataset=gdal.Open(pth1) + ds2:gdal.Dataset=gdal.Open(pth2) + + cell_size = layer_parent.cell_size + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + + band = ds1.RasterCount + yblocks = ysize // cell_size[1] + + driver = gdal.GetDriverByName('GTiff') + out_tif = os.path.join(Project().other_path, '%d.tif'%(int(datetime.now().timestamp() * 1000))) + out_ds = driver.Create(out_tif, xsize, ysize, 1, gdal.GDT_Float32) + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + out_ds.SetGeoTransform(geo) + out_ds.SetProjection(proj) + pixnum=w_size[0]*w_size[1] + # send_message.emit('pixnum:'pixnum) + max_diff = 0 + min_diff = math.inf + win_h=w_size[0]//2 #half hight of window + win_w=w_size[1]//2 #half width of window + a=[[(i+1)**j for j in range(n+1)] for i in range(pixnum)] + A=np.array(a).astype(np.float64)# + + k_=np.array(range(1,n+1)) + df1=np.zeros(pixnum).astype(np.float64) + df2=np.zeros(pixnum).astype(np.float64) + + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + for j in range(yblocks + 1): + if send_message is not None: + send_message.emit(f'计算{j}/{yblocks}') + block_xy1 = (start1x, start1y+j * cell_size[1]) + block_xy2 = (start2x,start2y+j*cell_size[1]) + block_xy=(0,j * cell_size[1]) + if block_xy1[1] > end1y or block_xy2[1] > end2y: + break + block_size=(xsize, cell_size[1]) + block_size1 = (xsize, cell_size[1]) + block_size2 = (xsize,cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + if block_xy1[1] + block_size1[1] > end1y: + block_size1 = (xsize,end1y - block_xy1[1]) + if block_xy2[1] + block_size2[1] > end2y: + block_size2 = (xsize, end2y - block_xy2[1]) + block_data1 = ds1.ReadAsArray(*block_xy1, *block_size1) + block_data2 = ds2.ReadAsArray(*block_xy2, *block_size2) + + if band == 1: + block_data1 = block_data1[None, ...] + block_data2 = block_data2[None, ...] + # pdb.set_trace() + else: + block_data1=np.mean(block_data1,0) + block_data2=np.mean(block_data2,0) + block_diff=np.zeros(block_data1.shape).astype(np.float64) + + for i in range(win_h,block_size1[1]-win_h): + for j_ in range(win_w,block_size1[0]-win_w): + pix=0 + + #get b + # b1=block_data[i+win_h:i+win_h] c in range(j_-win_w,j_+win_w+1) + b1=block_data1[i-win_h:i+win_h+1,j_-win_w:j_+win_w+1] + b2=block_data2[i-win_h:i+win_h+1,j_-win_w:j_+win_w+1] + b1=[b if (r+1)//2 else b[::-1] for r,b in enumerate(b1)] + b2=[b if (r+1)//2 else b[::-1] for r,b in enumerate(b2)] + b1=np.expand_dims(np.concatenate(b1,0),1) + b2=np.expand_dims(np.concatenate(b2,0),1) + + x1=np.squeeze(np.linalg.pinv(A).dot(b1)) + x2=np.squeeze(np.linalg.pinv(A).dot(b2)) + #df + k_=range(1,n+1) + for pix in range(1,pixnum+1): + df1[pix-1]=x1[1:n+1].dot(np.array([k*(pix**(k-1)) for k in k_])) + df2[pix-1]=x2[1:n+1].dot(np.array([k*(pix**(k-1)) for k in k_])) + + #distance 欧式距离 + block_diff[i][j_]=np.dot(df1-df2,df1-df2)**0.5 + + min_diff = min(min_diff, block_diff[block_diff > 0].min()) + max_diff = max(max_diff, block_diff.max()) + out_ds.GetRasterBand(1).WriteArray(block_diff, *block_xy) + + send_message.emit(f'完成{j}/{yblocks}') + del ds2 + del ds1 + out_ds.FlushCache() + del out_ds + if send_message is not None: + send_message.emit('归一化概率中...') + temp_in_ds = gdal.Open(out_tif) + + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + out_normal_ds = driver.Create(out_normal_tif, xsize, ysize, 1, gdal.GDT_Byte) + out_normal_ds.SetGeoTransform(geo) + out_normal_ds.SetProjection(proj) + # hist = np.zeros(256, dtype=np.int32) + for j in range(yblocks+1): + block_xy = (0, j * cell_size[1]) + if block_xy[1] > ysize: + break + block_size = (xsize, cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + block_data = temp_in_ds.ReadAsArray(*block_xy, *block_size) + block_data = (block_data - min_diff) / (max_diff - min_diff) * 255 + block_data = block_data.astype(np.uint8) + out_normal_ds.GetRasterBand(1).WriteArray(block_data, *block_xy) + # hist_t, _ = np.histogram(block_data, bins=256, range=(0, 256)) + # hist += hist_t + # print(hist) + del temp_in_ds + del out_normal_ds + try: + os.remove(out_tif) + except: + pass + + if send_message is not None: + send_message.emit('LSTS法计算完成') + return out_normal_tif + + +@UNSUPER_CD.register +class CVAAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'CVA' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + ds1:gdal.Dataset=gdal.Open(pth1) + ds2:gdal.Dataset=gdal.Open(pth2) + + cell_size = layer_parent.cell_size + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + + band = ds1.RasterCount + yblocks = ysize // cell_size[1] + + driver = gdal.GetDriverByName('GTiff') + out_tif = os.path.join(Project().other_path, 'temp.tif') + out_ds = driver.Create(out_tif, xsize, ysize, 1, gdal.GDT_Float32) + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + out_ds.SetGeoTransform(geo) + out_ds.SetProjection(proj) + max_diff = 0 + min_diff = math.inf + + + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + for j in range(yblocks + 1): + if send_message is not None: + send_message.emit(f'计算{j}/{yblocks}') + block_xy1 = (start1x, start1y+j * cell_size[1]) + block_xy2 = (start2x,start2y+j*cell_size[1]) + block_xy=(0,j * cell_size[1]) + if block_xy1[1] > end1y or block_xy2[1] > end2y: + break + block_size=(xsize, cell_size[1]) + block_size1 = (xsize, cell_size[1]) + block_size2 = (xsize,cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + if block_xy1[1] + block_size1[1] > end1y: + block_size1 = (xsize,end1y - block_xy1[1]) + if block_xy2[1] + block_size2[1] > end2y: + block_size2 = (xsize, end2y - block_xy2[1]) + block_data1 = ds1.ReadAsArray(*block_xy1, *block_size1) + block_data2 = ds2.ReadAsArray(*block_xy2, *block_size2) + + if band == 1: + block_data1 = block_data1[None, ...] + block_data2 = block_data2[None, ...] + # pdb.set_trace() + block_diff=np.sum((block_data1-block_data2)**2,0)**0.5 + min_diff = min(min_diff, block_diff[block_diff > 0].min()) + max_diff = max(max_diff, block_diff.max()) + out_ds.GetRasterBand(1).WriteArray(block_diff, *block_xy) + if send_message is not None: + send_message.emit(f'完成{j}/{yblocks}') + del ds2 + del ds1 + out_ds.FlushCache() + del out_ds + if send_message is not None: + send_message.emit('归一化概率中...') + temp_in_ds = gdal.Open(out_tif) + + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + out_normal_ds = driver.Create(out_normal_tif, xsize, ysize, 1, gdal.GDT_Byte) + out_normal_ds.SetGeoTransform(geo) + out_normal_ds.SetProjection(proj) + # hist = np.zeros(256, dtype=np.int32) + for j in range(yblocks+1): + block_xy = (0, j * cell_size[1]) + if block_xy[1] > ysize: + break + block_size = (xsize, cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + block_data = temp_in_ds.ReadAsArray(*block_xy, *block_size) + block_data = (block_data - min_diff) / (max_diff - min_diff) * 255 + block_data = block_data.astype(np.uint8) + out_normal_ds.GetRasterBand(1).WriteArray(block_data, *block_xy) + # hist_t, _ = np.histogram(block_data, bins=256, range=(0, 256)) + # hist += hist_t + # print(hist) + del temp_in_ds + del out_normal_ds + try: + os.remove(out_tif) + except: + pass + if send_message is not None: + send_message.emit('欧式距离计算完成') + return out_normal_tif + +@UNSUPER_CD.register +class ACDAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'ACD' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + # send_message.emit = print + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + + + #运算 + send_message.emit('开始ACD计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + ACD(temp_tif1,temp_tif2,out_normal_tif) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + + return out_normal_tif + + +@UNSUPER_CD.register +class AHTAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'AHT' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + + + #运算 + send_message.emit('开始AHT计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + AHT(temp_tif1,temp_tif2,out_normal_tif) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + + return out_normal_tif + + +@UNSUPER_CD.register +class OCDAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'OCD' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + + + #运算 + send_message.emit('开始OCD计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + OCD(temp_tif1,temp_tif2,out_normal_tif,Project().other_path) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + + return out_normal_tif + +@UNSUPER_CD.register +class LHBAAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'LHBA' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + #运算 + send_message.emit('开始LHBA计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + LHBA(temp_tif1,temp_tif2,out_normal_tif) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + return out_normal_tif + + +@UNSUPER_CD.register +class SHAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'SH' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + + + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + #运算 + send_message.emit('开始SH计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + SH(temp_tif1,temp_tif2,out_normal_tif) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + return out_normal_tif diff --git a/plugins/veg_method/__init__.py b/plugins/veg_method/__init__.py new file mode 100644 index 0000000..7a77e29 --- /dev/null +++ b/plugins/veg_method/__init__.py @@ -0,0 +1 @@ +from veg_method.main import * \ No newline at end of file diff --git a/plugins/veg_method/main.py b/plugins/veg_method/main.py new file mode 100644 index 0000000..18cc6b7 --- /dev/null +++ b/plugins/veg_method/main.py @@ -0,0 +1,226 @@ +from functools import partial +from threading import Thread +from plugins.misc.main import AlgFrontend +from rscder.gui.actions import ActionManager +from rscder.plugins.basic import BasicPlugin +from PyQt5.QtWidgets import QAction, QToolBar, QMenu, QDialog, QHBoxLayout, QVBoxLayout, QPushButton,QWidget,QLabel,QLineEdit,QPushButton,QComboBox,QDialogButtonBox + +from rscder.gui.layercombox import PairLayerCombox +from rscder.utils.icons import IconInstance +from filter_collection import FILTER +from .scripts import VEG_CD +from thres import THRES +from misc import table_layer, AlgSelectWidget +from follow import FOLLOW + +class VegtationCDMethod(QDialog): + def __init__(self,parent=None, alg:AlgFrontend=None): + super(VegtationCDMethod, self).__init__(parent) + self.alg = alg + self.setWindowTitle('植被变化检测:{}'.format(alg.get_name())) + self.setWindowIcon(IconInstance().LOGO) + self.initUI() + self.setMinimumWidth(500) + + def initUI(self): + #图层 + self.layer_combox = PairLayerCombox(self) + layerbox = QHBoxLayout() + layerbox.addWidget(self.layer_combox) + + self.filter_select = AlgSelectWidget(self, FILTER) + self.param_widget = self.alg.get_widget(self) + self.unsupervised_menu = self.param_widget + self.thres_select = AlgSelectWidget(self, THRES) + + self.ok_button = QPushButton('确定', self) + self.ok_button.setIcon(IconInstance().OK) + self.ok_button.clicked.connect(self.accept) + self.ok_button.setDefault(True) + + self.cancel_button = QPushButton('取消', self) + self.cancel_button.setIcon(IconInstance().CANCEL) + self.cancel_button.clicked.connect(self.reject) + self.cancel_button.setDefault(False) + buttonbox=QDialogButtonBox(self) + buttonbox.addButton(self.ok_button,QDialogButtonBox.NoRole) + buttonbox.addButton(self.cancel_button,QDialogButtonBox.NoRole) + buttonbox.setCenterButtons(True) + + totalvlayout=QVBoxLayout() + totalvlayout.addLayout(layerbox) + totalvlayout.addWidget(self.filter_select) + if self.param_widget is not None: + totalvlayout.addWidget(self.param_widget) + totalvlayout.addWidget(self.thres_select) + totalvlayout.addStretch(1) + hbox = QHBoxLayout() + hbox.addStretch(1) + hbox.addWidget(buttonbox) + totalvlayout.addLayout(hbox) + # totalvlayout.addStretch() + + self.setLayout(totalvlayout) + +@FOLLOW.register +class VegetationCDFollow(AlgFrontend): + + @staticmethod + def get_name(): + return '植被变化检测' + + @staticmethod + def get_icon(): + return IconInstance().UNSUPERVISED + + @staticmethod + def get_widget(parent=None): + widget = QWidget(parent) + layer_combox = PairLayerCombox(widget) + layer_combox.setObjectName('layer_combox') + + filter_select = AlgSelectWidget(widget, FILTER) + filter_select.setObjectName('filter_select') + unsupervised_select = AlgSelectWidget(widget, VEG_CD) + unsupervised_select.setObjectName('unsupervised_select') + thres_select = AlgSelectWidget(widget, THRES) + thres_select.setObjectName('thres_select') + + totalvlayout=QVBoxLayout() + totalvlayout.addWidget(layer_combox) + totalvlayout.addWidget(filter_select) + totalvlayout.addWidget(unsupervised_select) + totalvlayout.addWidget(thres_select) + totalvlayout.addStretch() + + widget.setLayout(totalvlayout) + + return widget + + @staticmethod + def get_params(widget:QWidget=None): + if widget is None: + return dict() + + layer_combox = widget.findChild(PairLayerCombox, 'layer_combox') + filter_select = widget.findChild(AlgSelectWidget, 'filter_select') + unsupervised_select = widget.findChild(AlgSelectWidget, 'unsupervised_select') + thres_select = widget.findChild(AlgSelectWidget, 'thres_select') + + layer1=layer_combox.layer1 + pth1 = layer_combox.layer1.path + pth2 = layer_combox.layer2.path + + falg, fparams = filter_select.get_alg_and_params() + cdalg, cdparams = unsupervised_select.get_alg_and_params() + thalg, thparams = thres_select.get_alg_and_params() + + if cdalg is None or thalg is None: + return dict() + + return dict( + layer1=layer1, + pth1 = pth1, + pth2 = pth2, + falg = falg, + fparams = fparams, + cdalg = cdalg, + cdparams = cdparams, + thalg = thalg, + thparams = thparams, + ) + + @staticmethod + def run_alg(layer1=None, + pth1 = None, + pth2 = None, + falg = None, + fparams = None, + cdalg = None, + cdparams = None, + thalg = None, + thparams = None, + send_message = None): + + if cdalg is None or thalg is None: + return + + name = layer1.name + + if falg is not None: + pth1 = falg.run_alg(pth1, name=name, send_message= send_message, **fparams) + pth2 = falg.run_alg(pth2, name=name, send_message= send_message, **fparams) + + + cdpth = cdalg.run_alg(pth1, pth2, layer1.layer_parent, send_message= send_message,**cdparams) + thpth = thalg.run_alg(cdpth, name=name, send_message= send_message, **thparams) + + table_layer(thpth,layer1,name, send_message) + + + + +class VegtationPlugin(BasicPlugin): + + + @staticmethod + def info(): + return { + 'name': 'VegtationPlugin', + 'description': 'VegtationPlugin', + 'author': 'RSCDER', + 'version': '1.0.0', + } + + def set_action(self): + veg_menu = ActionManager().veg_menu + # veg_menu.setIcon(IconInstance().UNSUPERVISED) + # ActionManager().veg_menu.addMenu(veg_menu) + + for key in VEG_CD.keys(): + alg:AlgFrontend = VEG_CD[key] + if alg.get_name() is None: + name = key + else: + name = alg.get_name() + + action = QAction(name, veg_menu) + func = partial(self.run_cd, alg) + action.triggered.connect(func) + + veg_menu.addAction(action) + + + def run_cd(self, alg): + dialog = VegtationCDMethod(self.mainwindow, alg) + dialog.show() + + if dialog.exec_() == QDialog.Accepted: + t = Thread(target=self.run_cd_alg, args=(dialog,)) + t.start() + + def run_cd_alg(self, w:VegtationCDMethod): + + layer1=w.layer_combox.layer1 + pth1 = w.layer_combox.layer1.path + pth2 = w.layer_combox.layer2.path + name = layer1.layer_parent.name + + falg, fparams = w.filter_select.get_alg_and_params() + cdalg = w.alg + cdparams = w.alg.get_params() + thalg, thparams = w.thres_select.get_alg_and_params() + + if cdalg is None or thalg is None: + return + + if falg is not None: + pth1 = falg.run_alg(pth1, name=name, send_message=self.send_message, **fparams) + pth2 = falg.run_alg(pth2, name=name, send_message=self.send_message, **fparams) + + + cdpth = cdalg.run_alg(pth1, pth2, layer1.layer_parent, send_message=self.send_message,**cdparams) + thpth = thalg.run_alg(cdpth, name=name, send_message=self.send_message, **thparams) + + table_layer(thpth,layer1,name,self.send_message) + \ No newline at end of file diff --git a/plugins/veg_method/pic.py b/plugins/veg_method/pic.py new file mode 100644 index 0000000..52ec35a --- /dev/null +++ b/plugins/veg_method/pic.py @@ -0,0 +1,455 @@ +# -*- coding: utf-8 -*- + +# Resource object code +# +# Created by: The Resource Compiler for PyQt5 (Qt v5.12.9) +# +# WARNING! All changes made in this file will be lost! + +from PyQt5 import QtCore + +qt_resource_data = b"\ +\x00\x00\x05\x32\ +\x3c\ +\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ +\x30\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\x6e\ +\x6f\x22\x3f\x3e\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\x20\x73\x76\ +\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\x57\x33\x43\ +\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\x2f\x2f\x45\ +\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\ +\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\x73\x2f\x53\ +\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\x67\x31\x31\ +\x2e\x64\x74\x64\x22\x3e\x3c\x73\x76\x67\x20\x74\x3d\x22\x31\x36\ +\x35\x35\x31\x30\x35\x33\x34\x38\x31\x31\x38\x22\x20\x63\x6c\x61\ +\x73\x73\x3d\x22\x69\x63\x6f\x6e\x22\x20\x76\x69\x65\x77\x42\x6f\ +\x78\x3d\x22\x30\x20\x30\x20\x31\x30\x32\x34\x20\x31\x30\x32\x34\ +\x22\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\ +\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ +\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\ +\x67\x22\x20\x70\x2d\x69\x64\x3d\x22\x32\x31\x33\x37\x22\x20\x78\ +\x6d\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\ +\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\ +\x39\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x77\x69\x64\x74\x68\x3d\ +\x22\x31\x32\x38\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x31\x32\ +\x38\x22\x3e\x3c\x64\x65\x66\x73\x3e\x3c\x73\x74\x79\x6c\x65\x20\ +\x74\x79\x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x3e\ +\x40\x66\x6f\x6e\x74\x2d\x66\x61\x63\x65\x20\x7b\x20\x66\x6f\x6e\ +\x74\x2d\x66\x61\x6d\x69\x6c\x79\x3a\x20\x66\x65\x65\x64\x62\x61\ +\x63\x6b\x2d\x69\x63\x6f\x6e\x66\x6f\x6e\x74\x3b\x20\x73\x72\x63\ +\x3a\x20\x75\x72\x6c\x28\x22\x2f\x2f\x61\x74\x2e\x61\x6c\x69\x63\ +\x64\x6e\x2e\x63\x6f\x6d\x2f\x74\x2f\x66\x6f\x6e\x74\x5f\x31\x30\ +\x33\x31\x31\x35\x38\x5f\x75\x36\x39\x77\x38\x79\x68\x78\x64\x75\ +\x2e\x77\x6f\x66\x66\x32\x3f\x74\x3d\x31\x36\x33\x30\x30\x33\x33\ +\x37\x35\x39\x39\x34\x34\x22\x29\x20\x66\x6f\x72\x6d\x61\x74\x28\ +\x22\x77\x6f\x66\x66\x32\x22\x29\x2c\x20\x75\x72\x6c\x28\x22\x2f\ +\x2f\x61\x74\x2e\x61\x6c\x69\x63\x64\x6e\x2e\x63\x6f\x6d\x2f\x74\ +\x2f\x66\x6f\x6e\x74\x5f\x31\x30\x33\x31\x31\x35\x38\x5f\x75\x36\ +\x39\x77\x38\x79\x68\x78\x64\x75\x2e\x77\x6f\x66\x66\x3f\x74\x3d\ +\x31\x36\x33\x30\x30\x33\x33\x37\x35\x39\x39\x34\x34\x22\x29\x20\ +\x66\x6f\x72\x6d\x61\x74\x28\x22\x77\x6f\x66\x66\x22\x29\x2c\x20\ +\x75\x72\x6c\x28\x22\x2f\x2f\x61\x74\x2e\x61\x6c\x69\x63\x64\x6e\ +\x2e\x63\x6f\x6d\x2f\x74\x2f\x66\x6f\x6e\x74\x5f\x31\x30\x33\x31\ +\x31\x35\x38\x5f\x75\x36\x39\x77\x38\x79\x68\x78\x64\x75\x2e\x74\ +\x74\x66\x3f\x74\x3d\x31\x36\x33\x30\x30\x33\x33\x37\x35\x39\x39\ +\x34\x34\x22\x29\x20\x66\x6f\x72\x6d\x61\x74\x28\x22\x74\x72\x75\ +\x65\x74\x79\x70\x65\x22\x29\x3b\x20\x7d\x0a\x3c\x2f\x73\x74\x79\ +\x6c\x65\x3e\x3c\x2f\x64\x65\x66\x73\x3e\x3c\x70\x61\x74\x68\x20\ +\x64\x3d\x22\x4d\x33\x31\x32\x2e\x38\x38\x38\x38\x38\x39\x20\x39\ +\x39\x35\x2e\x35\x35\x35\x35\x35\x36\x63\x2d\x31\x37\x2e\x30\x36\ +\x36\x36\x36\x37\x20\x30\x2d\x32\x38\x2e\x34\x34\x34\x34\x34\x34\ +\x2d\x35\x2e\x36\x38\x38\x38\x38\x39\x2d\x33\x39\x2e\x38\x32\x32\ +\x32\x32\x32\x2d\x31\x37\x2e\x30\x36\x36\x36\x36\x37\x2d\x32\x32\ +\x2e\x37\x35\x35\x35\x35\x36\x2d\x32\x32\x2e\x37\x35\x35\x35\x35\ +\x36\x2d\x31\x37\x2e\x30\x36\x36\x36\x36\x37\x2d\x35\x36\x2e\x38\ +\x38\x38\x38\x38\x39\x20\x35\x2e\x36\x38\x38\x38\x38\x39\x2d\x37\ +\x39\x2e\x36\x34\x34\x34\x34\x35\x6c\x33\x36\x34\x2e\x30\x38\x38\ +\x38\x38\x38\x2d\x33\x32\x39\x2e\x39\x35\x35\x35\x35\x35\x63\x31\ +\x31\x2e\x33\x37\x37\x37\x37\x38\x2d\x31\x31\x2e\x33\x37\x37\x37\ +\x37\x38\x20\x31\x37\x2e\x30\x36\x36\x36\x36\x37\x2d\x32\x32\x2e\ +\x37\x35\x35\x35\x35\x36\x20\x31\x37\x2e\x30\x36\x36\x36\x36\x37\ +\x2d\x33\x34\x2e\x31\x33\x33\x33\x33\x33\x20\x30\x2d\x31\x31\x2e\ +\x33\x37\x37\x37\x37\x38\x2d\x35\x2e\x36\x38\x38\x38\x38\x39\x2d\ +\x32\x32\x2e\x37\x35\x35\x35\x35\x36\x2d\x31\x37\x2e\x30\x36\x36\ +\x36\x36\x37\x2d\x33\x34\x2e\x31\x33\x33\x33\x33\x34\x4c\x32\x37\ +\x33\x2e\x30\x36\x36\x36\x36\x37\x20\x31\x38\x37\x2e\x37\x33\x33\ +\x33\x33\x33\x63\x2d\x32\x32\x2e\x37\x35\x35\x35\x35\x36\x2d\x32\ +\x32\x2e\x37\x35\x35\x35\x35\x36\x2d\x32\x38\x2e\x34\x34\x34\x34\ +\x34\x34\x2d\x35\x36\x2e\x38\x38\x38\x38\x38\x39\x2d\x35\x2e\x36\ +\x38\x38\x38\x38\x39\x2d\x37\x39\x2e\x36\x34\x34\x34\x34\x34\x20\ +\x32\x32\x2e\x37\x35\x35\x35\x35\x36\x2d\x32\x32\x2e\x37\x35\x35\ +\x35\x35\x36\x20\x35\x36\x2e\x38\x38\x38\x38\x38\x39\x2d\x32\x38\ +\x2e\x34\x34\x34\x34\x34\x34\x20\x37\x39\x2e\x36\x34\x34\x34\x34\ +\x34\x2d\x35\x2e\x36\x38\x38\x38\x38\x39\x6c\x33\x36\x34\x2e\x30\ +\x38\x38\x38\x38\x39\x20\x33\x31\x32\x2e\x38\x38\x38\x38\x38\x39\ +\x63\x33\x34\x2e\x31\x33\x33\x33\x33\x33\x20\x32\x38\x2e\x34\x34\ +\x34\x34\x34\x34\x20\x35\x36\x2e\x38\x38\x38\x38\x38\x39\x20\x37\ +\x33\x2e\x39\x35\x35\x35\x35\x36\x20\x35\x36\x2e\x38\x38\x38\x38\ +\x38\x39\x20\x31\x31\x39\x2e\x34\x36\x36\x36\x36\x37\x73\x2d\x31\ +\x37\x2e\x30\x36\x36\x36\x36\x37\x20\x38\x35\x2e\x33\x33\x33\x33\ +\x33\x33\x2d\x35\x31\x2e\x32\x20\x31\x31\x39\x2e\x34\x36\x36\x36\ +\x36\x36\x6c\x2d\x33\x36\x34\x2e\x30\x38\x38\x38\x38\x39\x20\x33\ +\x32\x39\x2e\x39\x35\x35\x35\x35\x36\x63\x2d\x31\x31\x2e\x33\x37\ +\x37\x37\x37\x38\x20\x35\x2e\x36\x38\x38\x38\x38\x39\x2d\x32\x38\ +\x2e\x34\x34\x34\x34\x34\x34\x20\x31\x31\x2e\x33\x37\x37\x37\x37\ +\x38\x2d\x33\x39\x2e\x38\x32\x32\x32\x32\x32\x20\x31\x31\x2e\x33\ +\x37\x37\x37\x37\x38\x7a\x22\x20\x70\x2d\x69\x64\x3d\x22\x32\x31\ +\x33\x38\x22\x3e\x3c\x2f\x70\x61\x74\x68\x3e\x3c\x2f\x73\x76\x67\ +\x3e\ +\x00\x00\x04\xf8\ +\x89\ +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ +\x00\x00\x80\x00\x00\x00\x80\x08\x06\x00\x00\x00\xc3\x3e\x61\xcb\ +\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x04\ +\xb2\x49\x44\x41\x54\x78\x5e\xed\x99\xef\x8e\x15\x45\x10\xc5\xab\ +\xf7\x71\xf0\x31\xa6\x7b\xdf\x40\xfc\x13\x10\x54\xa2\x04\x95\x68\ +\x50\x09\x2a\x51\x09\x2a\x41\x45\x09\x2a\x41\x82\x88\x4a\x80\x7d\ +\x85\xa9\x7e\x0c\x7d\x9c\x5b\x66\xd4\xd5\x05\x2e\x5b\x3b\xe5\x07\ +\xee\x9c\x3a\xfd\x75\xeb\x64\x73\xce\xf9\xa5\x7a\x66\x6e\x11\x9e\ +\xd4\x09\x94\xd4\xee\x69\x5e\x08\x40\x72\x08\x08\x00\x01\x48\x9e\ +\x40\x72\xfb\xdc\x00\x04\x20\x79\x02\xc9\xed\x73\x03\x10\x80\xe4\ +\x09\x24\xb7\xcf\x0d\x40\x00\x92\x27\x90\xdc\x3e\x37\x00\x01\x48\ +\x9e\x40\x72\xfb\xdc\x00\x04\x20\x79\x02\xc9\xed\x73\x03\x10\x80\ +\xe4\x09\x24\xb7\xcf\x0d\x40\x00\x92\x27\x90\xdc\x3e\x37\x00\x01\ +\x48\x9e\x40\x72\xfb\xdc\x00\x04\x20\x79\x02\xc9\xed\x73\x03\x10\ +\x80\xe4\x09\x24\xb7\xcf\x0d\x40\x00\x92\x27\x90\xdc\x3e\x37\x00\ +\x01\x48\x9e\x40\x72\xfb\xdc\x00\x04\x20\x79\x02\xc9\xed\x43\x6f\ +\x80\x61\x18\x0e\xf5\xde\xff\x48\xde\xf1\xbe\xf6\x61\x01\x98\xca\ +\xdf\xda\xda\xda\x59\xad\x56\x87\x09\xc1\x93\x19\x80\x04\x60\xb7\ +\x7c\x33\x7b\xa6\x94\xf2\x3b\x21\x48\x04\xc0\xde\xf2\x77\x6d\x13\ +\x82\x24\x00\xac\x2b\x9f\x10\xec\xff\x04\x04\x73\x05\xec\x57\x3e\ +\x21\x00\xdf\x00\x07\x29\x9f\x10\xac\x87\x60\xf1\x1b\x60\x4e\xf9\ +\x84\xe0\x71\x08\x16\x0d\x40\xa4\x7c\x42\xf0\x30\x04\x8b\x06\x60\ +\xb2\x42\x08\xfe\xdf\x67\xae\xc5\x03\x40\x08\x08\xc0\x5f\x09\x70\ +\x13\xc4\x40\x80\xd8\x00\xbb\xd6\x09\xc1\x7c\x08\xa0\x00\xe0\x26\ +\x20\x00\xbc\x0e\x66\x32\x00\xb7\x01\x78\x1d\xcc\x23\x00\x16\x00\ +\x5e\x07\x07\x03\x01\x1a\x00\x42\xe0\x43\x00\x0f\x00\x21\x48\xf2\ +\x6b\xa0\xc7\x3a\x5f\x11\x41\x7f\x0c\xf2\x8a\xdf\xfb\x77\x42\x00\ +\xf6\x63\xd0\x9c\xf2\xf9\x76\xc0\x0d\xf0\x6f\x02\xdc\x04\xff\xc1\ +\x90\xe2\x21\x70\x1d\xfb\x84\xe0\xef\x54\xd2\x02\xc0\xb7\x03\x02\ +\xc0\xcf\xc6\xd9\x37\x00\x1f\x0c\x93\x5f\x01\x7c\x45\x24\x00\x0f\ +\x3d\x1f\x66\x7c\x30\x4c\xfd\x10\xc8\xb7\x03\x6e\x80\xb5\x5f\x47\ +\x6a\xad\x1f\x8b\xc8\x27\x91\x0f\x4d\x22\xf2\xa9\xaa\x46\xb5\xc1\ +\x7f\x19\x97\x71\x03\x3c\x92\xdd\x30\x0c\xe7\x4b\x29\x17\x22\x91\ +\x9a\xd9\x85\xde\xfb\x04\xcf\x62\x0e\x01\xd8\x53\x55\xad\xf5\x43\ +\x11\xb9\x18\x6c\xef\xa2\xaa\x9e\x0f\x6a\x9f\x9a\x8c\x00\xfc\x13\ +\xfd\x30\x0c\xe7\x4a\x29\x9f\x07\x9b\xf8\x4c\x55\x3f\x0a\x6a\x9f\ +\xaa\x8c\x00\x88\x48\x6b\xed\xac\x99\x5d\x8a\x34\x51\x4a\xf9\x62\ +\x1c\xc7\x0f\x22\xda\x4d\xd0\xa4\x07\xa0\xd6\xfa\x9e\x88\x5c\x0e\ +\x96\x71\x49\x55\xcf\x05\xb5\x1b\x21\x4b\x0d\x40\x6b\xed\x8c\x99\ +\x7d\x15\x69\xc2\xcc\x2e\xf7\xde\xcf\x46\xb4\x9b\xa4\x49\x0b\x40\ +\xad\xf5\x1d\x11\xb9\x12\x2c\xe3\x4b\x55\x7d\x3f\xa8\xdd\x28\x59\ +\x4a\x00\x6a\xad\x6f\x8b\xc8\x37\x91\x26\xcc\xec\xeb\xde\xfb\xbb\ +\x11\xed\x26\x6a\xd2\x01\x30\x0c\xc3\xe9\x52\xca\xd5\x48\x19\xa5\ +\x94\x2b\xe3\x38\x9e\x89\x68\x37\x55\x93\x0a\x80\x5a\xeb\x9b\x22\ +\x72\x2d\x58\xc6\xb7\xaa\x3a\x5d\x1b\x50\x27\x0d\x00\xc3\x30\x9c\ +\x2a\xa5\x7c\x1f\x69\xcf\xcc\xae\xf6\xde\xa7\x6b\x03\xee\xa4\x00\ +\xa0\xb5\x76\xd2\xcc\xae\x07\xdb\xbb\xa6\xaa\xa7\x83\xda\x8d\x97\ +\xc1\x03\x50\x6b\x7d\x4d\x44\x6e\x04\x9b\xf8\x4e\x55\xdf\x0a\x6a\ +\x17\x21\x83\x06\xa0\xb5\x76\xc2\xcc\x6e\x06\x9b\xf8\x41\x55\xdf\ +\x08\x6a\x17\x23\x83\x05\xa0\xd6\xfa\x8a\x88\xdc\x0a\x36\x71\x5d\ +\x55\x4f\x05\xb5\x8b\x92\x41\x02\xd0\x5a\x3b\x6e\x66\xb7\x23\x4d\ +\x98\xd9\x8d\xde\xfb\xc9\x88\x76\x89\x1a\x38\x00\x6a\xad\x2f\x89\ +\xc8\x9d\x60\x19\x3f\xaa\xea\xeb\x41\xed\x22\x65\x50\x00\xb4\xd6\ +\x8e\x98\xd9\xaf\xc1\x26\x6e\xaa\xea\xf4\xc0\x98\xea\xc0\x00\x50\ +\x6b\x7d\x51\x44\xee\x46\xda\x2b\xa5\xdc\x1a\xc7\xf1\x44\x44\xbb\ +\x74\x0d\x04\x00\xdb\xdb\xdb\xcf\xaf\x56\xab\x7b\xc1\x32\x7e\x52\ +\xd5\x57\x83\xda\xc5\xcb\x16\x0f\x40\xad\xf5\xb0\x88\x3c\x88\x34\ +\x61\x66\x3f\xf7\xde\x5f\x8e\x68\x51\x34\x08\x00\xec\x88\xc8\xb3\ +\x73\x0b\x29\xa5\xdc\x19\xc7\xf1\xf8\x5c\x1d\xda\xfc\xe2\x01\x98\ +\x0a\xa9\xb5\xce\x85\xe0\x17\x55\x3d\x86\x56\x66\xc4\x0f\x04\x00\ +\x73\x20\x30\xb3\xdf\x7a\xef\x47\x23\x61\x21\x6a\x60\x00\x38\x20\ +\x04\x77\x55\xf5\x08\x62\x91\x51\x4f\x50\x00\x38\x10\xdc\x53\xd5\ +\xe9\x55\x91\x67\x4f\x02\x70\x00\xac\x83\xa0\x94\x72\x7f\x1c\xc7\ +\x17\xd8\xfc\xe3\x09\x40\x02\xf0\x08\x04\x3b\xaa\xfa\x1c\xcb\x5f\ +\x9f\x00\x2c\x00\xbb\x10\xa8\xea\xf4\x9d\x80\xe7\x09\x09\x40\x03\ +\xc0\xd6\xfd\x04\x08\x80\x9f\x11\xf4\x04\x01\x80\xae\xd7\x37\x47\ +\x00\xfc\x8c\xa0\x27\x08\x00\x74\xbd\xbe\x39\x02\xe0\x67\x04\x3d\ +\x41\x00\xa0\xeb\xf5\xcd\x11\x00\x3f\x23\xe8\x09\x02\x00\x5d\xaf\ +\x6f\x8e\x00\xf8\x19\x41\x4f\x10\x00\xe8\x7a\x7d\x73\x04\xc0\xcf\ +\x08\x7a\x82\x00\x40\xd7\xeb\x9b\x23\x00\x7e\x46\xd0\x13\x04\x00\ +\xba\x5e\xdf\x1c\x01\xf0\x33\x82\x9e\x20\x00\xd0\xf5\xfa\xe6\x08\ +\x80\x9f\x11\xf4\x04\x01\x80\xae\xd7\x37\x47\x00\xfc\x8c\xa0\x27\ +\x08\x00\x74\xbd\xbe\x39\x02\xe0\x67\x04\x3d\x41\x00\xa0\xeb\xf5\ +\xcd\x11\x00\x3f\x23\xe8\x09\x02\x00\x5d\xaf\x6f\x8e\x00\xf8\x19\ +\x41\x4f\x10\x00\xe8\x7a\x7d\x73\x04\xc0\xcf\x08\x7a\x82\x00\x40\ +\xd7\xeb\x9b\x23\x00\x7e\x46\xd0\x13\x04\x00\xba\x5e\xdf\x1c\x01\ +\xf0\x33\x82\x9e\x20\x00\xd0\xf5\xfa\xe6\x08\x80\x9f\x11\xf4\x04\ +\x01\x80\xae\xd7\x37\x47\x00\xfc\x8c\xa0\x27\x08\x00\x74\xbd\xbe\ +\xb9\x3f\x01\xc2\xa1\x1b\x9f\x9b\x5d\x0e\x95\x00\x00\x00\x00\x49\ +\x45\x4e\x44\xae\x42\x60\x82\ +\x00\x00\x05\x0d\ +\x3c\ +\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ +\x30\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\x6e\ +\x6f\x22\x3f\x3e\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\x20\x73\x76\ +\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\x57\x33\x43\ +\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\x2f\x2f\x45\ +\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\ +\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\x73\x2f\x53\ +\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\x67\x31\x31\ +\x2e\x64\x74\x64\x22\x3e\x3c\x73\x76\x67\x20\x74\x3d\x22\x31\x36\ +\x35\x35\x31\x30\x35\x33\x35\x33\x37\x31\x33\x22\x20\x63\x6c\x61\ +\x73\x73\x3d\x22\x69\x63\x6f\x6e\x22\x20\x76\x69\x65\x77\x42\x6f\ +\x78\x3d\x22\x30\x20\x30\x20\x31\x30\x32\x34\x20\x31\x30\x32\x34\ +\x22\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\ +\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ +\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\ +\x67\x22\x20\x70\x2d\x69\x64\x3d\x22\x32\x32\x39\x32\x22\x20\x78\ +\x6d\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\ +\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\ +\x39\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x77\x69\x64\x74\x68\x3d\ +\x22\x31\x32\x38\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x31\x32\ +\x38\x22\x3e\x3c\x64\x65\x66\x73\x3e\x3c\x73\x74\x79\x6c\x65\x20\ +\x74\x79\x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x3e\ +\x40\x66\x6f\x6e\x74\x2d\x66\x61\x63\x65\x20\x7b\x20\x66\x6f\x6e\ +\x74\x2d\x66\x61\x6d\x69\x6c\x79\x3a\x20\x66\x65\x65\x64\x62\x61\ +\x63\x6b\x2d\x69\x63\x6f\x6e\x66\x6f\x6e\x74\x3b\x20\x73\x72\x63\ +\x3a\x20\x75\x72\x6c\x28\x22\x2f\x2f\x61\x74\x2e\x61\x6c\x69\x63\ +\x64\x6e\x2e\x63\x6f\x6d\x2f\x74\x2f\x66\x6f\x6e\x74\x5f\x31\x30\ +\x33\x31\x31\x35\x38\x5f\x75\x36\x39\x77\x38\x79\x68\x78\x64\x75\ +\x2e\x77\x6f\x66\x66\x32\x3f\x74\x3d\x31\x36\x33\x30\x30\x33\x33\ +\x37\x35\x39\x39\x34\x34\x22\x29\x20\x66\x6f\x72\x6d\x61\x74\x28\ +\x22\x77\x6f\x66\x66\x32\x22\x29\x2c\x20\x75\x72\x6c\x28\x22\x2f\ +\x2f\x61\x74\x2e\x61\x6c\x69\x63\x64\x6e\x2e\x63\x6f\x6d\x2f\x74\ +\x2f\x66\x6f\x6e\x74\x5f\x31\x30\x33\x31\x31\x35\x38\x5f\x75\x36\ +\x39\x77\x38\x79\x68\x78\x64\x75\x2e\x77\x6f\x66\x66\x3f\x74\x3d\ +\x31\x36\x33\x30\x30\x33\x33\x37\x35\x39\x39\x34\x34\x22\x29\x20\ +\x66\x6f\x72\x6d\x61\x74\x28\x22\x77\x6f\x66\x66\x22\x29\x2c\x20\ +\x75\x72\x6c\x28\x22\x2f\x2f\x61\x74\x2e\x61\x6c\x69\x63\x64\x6e\ +\x2e\x63\x6f\x6d\x2f\x74\x2f\x66\x6f\x6e\x74\x5f\x31\x30\x33\x31\ +\x31\x35\x38\x5f\x75\x36\x39\x77\x38\x79\x68\x78\x64\x75\x2e\x74\ +\x74\x66\x3f\x74\x3d\x31\x36\x33\x30\x30\x33\x33\x37\x35\x39\x39\ +\x34\x34\x22\x29\x20\x66\x6f\x72\x6d\x61\x74\x28\x22\x74\x72\x75\ +\x65\x74\x79\x70\x65\x22\x29\x3b\x20\x7d\x0a\x3c\x2f\x73\x74\x79\ +\x6c\x65\x3e\x3c\x2f\x64\x65\x66\x73\x3e\x3c\x70\x61\x74\x68\x20\ +\x64\x3d\x22\x4d\x35\x31\x37\x2e\x36\x38\x38\x38\x38\x39\x20\x37\ +\x39\x36\x2e\x34\x34\x34\x34\x34\x34\x63\x2d\x34\x35\x2e\x35\x31\ +\x31\x31\x31\x31\x20\x30\x2d\x38\x35\x2e\x33\x33\x33\x33\x33\x33\ +\x2d\x31\x37\x2e\x30\x36\x36\x36\x36\x37\x2d\x31\x31\x39\x2e\x34\ +\x36\x36\x36\x36\x37\x2d\x35\x31\x2e\x32\x4c\x37\x33\x2e\x39\x35\ +\x35\x35\x35\x36\x20\x33\x38\x31\x2e\x31\x35\x35\x35\x35\x36\x63\ +\x2d\x32\x32\x2e\x37\x35\x35\x35\x35\x36\x2d\x32\x32\x2e\x37\x35\ +\x35\x35\x35\x36\x2d\x31\x37\x2e\x30\x36\x36\x36\x36\x37\x2d\x35\ +\x36\x2e\x38\x38\x38\x38\x38\x39\x20\x35\x2e\x36\x38\x38\x38\x38\ +\x38\x2d\x37\x39\x2e\x36\x34\x34\x34\x34\x35\x20\x32\x32\x2e\x37\ +\x35\x35\x35\x35\x36\x2d\x32\x32\x2e\x37\x35\x35\x35\x35\x36\x20\ +\x35\x36\x2e\x38\x38\x38\x38\x38\x39\x2d\x31\x37\x2e\x30\x36\x36\ +\x36\x36\x37\x20\x37\x39\x2e\x36\x34\x34\x34\x34\x35\x20\x35\x2e\ +\x36\x38\x38\x38\x38\x39\x6c\x33\x32\x39\x2e\x39\x35\x35\x35\x35\ +\x35\x20\x33\x36\x34\x2e\x30\x38\x38\x38\x38\x39\x63\x35\x2e\x36\ +\x38\x38\x38\x38\x39\x20\x35\x2e\x36\x38\x38\x38\x38\x39\x20\x31\ +\x37\x2e\x30\x36\x36\x36\x36\x37\x20\x31\x31\x2e\x33\x37\x37\x37\ +\x37\x38\x20\x32\x38\x2e\x34\x34\x34\x34\x34\x35\x20\x31\x31\x2e\ +\x33\x37\x37\x37\x37\x38\x73\x32\x32\x2e\x37\x35\x35\x35\x35\x36\ +\x2d\x35\x2e\x36\x38\x38\x38\x38\x39\x20\x33\x34\x2e\x31\x33\x33\ +\x33\x33\x33\x2d\x31\x37\x2e\x30\x36\x36\x36\x36\x37\x6c\x33\x31\ +\x32\x2e\x38\x38\x38\x38\x38\x39\x2d\x33\x36\x34\x2e\x30\x38\x38\ +\x38\x38\x39\x63\x32\x32\x2e\x37\x35\x35\x35\x35\x36\x2d\x32\x32\ +\x2e\x37\x35\x35\x35\x35\x36\x20\x35\x36\x2e\x38\x38\x38\x38\x38\ +\x39\x2d\x32\x38\x2e\x34\x34\x34\x34\x34\x34\x20\x37\x39\x2e\x36\ +\x34\x34\x34\x34\x35\x2d\x35\x2e\x36\x38\x38\x38\x38\x39\x20\x32\ +\x32\x2e\x37\x35\x35\x35\x35\x36\x20\x32\x32\x2e\x37\x35\x35\x35\ +\x35\x36\x20\x32\x38\x2e\x34\x34\x34\x34\x34\x34\x20\x35\x36\x2e\ +\x38\x38\x38\x38\x38\x39\x20\x35\x2e\x36\x38\x38\x38\x38\x38\x20\ +\x37\x39\x2e\x36\x34\x34\x34\x34\x35\x4c\x36\x33\x37\x2e\x31\x35\ +\x35\x35\x35\x36\x20\x37\x33\x39\x2e\x35\x35\x35\x35\x35\x36\x63\ +\x2d\x32\x38\x2e\x34\x34\x34\x34\x34\x34\x20\x33\x39\x2e\x38\x32\ +\x32\x32\x32\x32\x2d\x36\x38\x2e\x32\x36\x36\x36\x36\x37\x20\x35\ +\x36\x2e\x38\x38\x38\x38\x38\x39\x2d\x31\x31\x39\x2e\x34\x36\x36\ +\x36\x36\x37\x20\x35\x36\x2e\x38\x38\x38\x38\x38\x38\x20\x35\x2e\ +\x36\x38\x38\x38\x38\x39\x20\x30\x20\x30\x20\x30\x20\x30\x20\x30\ +\x7a\x22\x20\x70\x2d\x69\x64\x3d\x22\x32\x32\x39\x33\x22\x3e\x3c\ +\x2f\x70\x61\x74\x68\x3e\x3c\x2f\x73\x76\x67\x3e\ +\x00\x00\x07\x08\ +\x89\ +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ +\x00\x00\x80\x00\x00\x00\x80\x08\x06\x00\x00\x00\xc3\x3e\x61\xcb\ +\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x06\ +\xc2\x49\x44\x41\x54\x78\x5e\xed\x9b\x7b\x68\x1c\x55\x14\xc6\xcf\ +\xc9\x6c\x51\x50\x50\xa2\x28\xa8\x28\x28\x28\x28\x28\x28\x28\x28\ +\xe8\xec\xce\xce\x2e\x0a\x0a\x2a\xe6\x61\xd3\x52\x69\xf1\x51\xd1\ +\xfa\x2a\x4a\x8b\x62\x8b\x5a\xd1\x2a\x5a\x14\x2b\x6a\x8b\x5a\xa3\ +\x35\x54\xc5\x77\x66\xee\x4d\x57\x22\x0d\xc5\x42\xb1\x50\x28\x15\ +\x25\x50\x14\x4a\x45\xa9\x18\x34\x66\x33\x47\x46\x6e\x30\x94\x24\ +\xdd\xb9\xfb\x9a\xd9\x73\xf6\xaf\x40\xee\x77\x77\xbe\xef\xfc\xf6\ +\xbb\xb3\xbb\x09\x82\x3c\x58\x27\x80\xac\xdd\x8b\x79\x10\x00\x98\ +\x43\x20\x00\x08\x00\xcc\x13\x60\x6e\x5f\x1a\x40\x00\x60\x9e\x00\ +\x73\xfb\xd2\x00\x02\x00\xf3\x04\x98\xdb\x97\x06\x10\x00\x98\x27\ +\xc0\xdc\xbe\x34\x80\x00\xc0\x3c\x01\xe6\xf6\xa5\x01\x04\x00\xe6\ +\x09\x30\xb7\x2f\x0d\x20\x00\x30\x4f\x80\xb9\x7d\x69\x00\x01\x80\ +\x79\x02\xcc\xed\x4b\x03\x08\x00\xcc\x13\x60\x6e\x5f\x1a\x40\x00\ +\x60\x9e\x00\x73\xfb\xd2\x00\x02\x00\xf3\x04\x98\xdb\x97\x06\x10\ +\x00\x98\x27\xc0\xdc\xbe\x34\x80\x00\xc0\x3c\x01\xe6\xf6\xa5\x01\ +\x04\x00\xe6\x09\x30\xb7\x2f\x0d\x20\x00\x30\x4f\x80\xb9\x7d\x69\ +\x00\x01\x80\x79\x02\xcc\xed\x4b\x03\x08\x00\xcc\x13\x60\x6e\x5f\ +\x1a\x40\x00\x60\x9e\x00\x73\xfb\xd2\x00\x02\x00\xf3\x04\x98\xdb\ +\x97\x06\x10\x00\x98\x27\xc0\xdc\x7e\xe6\x1a\xc0\xf7\xfd\xf5\xd5\ +\x6a\x75\xc7\xce\x9d\x3b\xbf\x4f\xfb\xec\x5c\xd7\xcd\xe5\x72\xb9\ +\x41\xa5\x54\x4f\x5a\xaf\x35\x53\x00\x78\x9e\xb7\x11\x11\x1f\x06\ +\x80\x83\x44\x34\xa0\xb5\xfe\x2e\xad\xc1\xba\xae\x7b\xa2\xe3\x38\ +\x83\x88\x78\x33\x00\x0c\xa5\x15\x82\xcc\x00\x50\x2c\x16\x5f\x05\ +\x80\x95\x33\x03\x27\xa2\x71\xc7\x71\x16\x07\x41\xb0\x2b\x6d\x10\ +\xb8\xae\x7b\xb2\x19\xfe\x8d\xb3\xae\x2d\x95\x10\x64\x02\x00\xcf\ +\xf3\xb6\x22\xe2\xb2\x39\x06\xfd\x33\x00\x0c\x28\xa5\x2a\x69\x81\ +\xc0\x75\xdd\x53\xcd\xf0\xaf\x9f\xe3\x9a\x52\x07\x41\xaa\x01\x88\ +\x6b\x34\x97\xcb\x6d\x03\x80\x5b\x17\x18\xf0\x11\x44\x1c\x08\xc3\ +\x30\x68\x37\x04\xae\xeb\x9e\xbe\x68\xd1\xa2\x41\x22\xf2\x17\xb8\ +\x96\x54\x41\x90\x5a\x00\xca\xe5\x72\xf7\xf4\xf4\xf4\x20\x00\x94\ +\x6b\x18\xec\x51\x73\x4f\xf0\x79\x0d\x6b\x9b\xb2\xc4\xf3\xbc\x33\ +\x11\xf1\x7d\x00\xc8\xd7\xf0\x04\xa9\x81\x20\x95\x00\xb8\xae\x7b\ +\x8e\xe3\x38\xdb\x11\xf1\xea\x1a\xc2\x9c\x59\xf2\x97\x39\x0e\x3e\ +\x4a\xa0\x69\xc8\xd2\x42\xa1\x70\x76\x5c\xfb\x44\x74\x6d\x82\x0d\ +\x53\x01\x41\xea\x00\xc8\xe7\xf3\x17\x39\x8e\xf3\x21\x00\x5c\x9a\ +\x20\xcc\x99\xa5\xd3\x44\xb4\x58\x6b\xbd\xdd\x42\x6b\x25\x29\x14\ +\x0a\xe7\x99\xe1\x27\x81\x75\xe6\xb9\xda\x0e\x41\xea\x00\x88\x93\ +\xf1\x7d\xff\x09\x22\x5a\x67\x35\x11\x00\x40\xc4\xa5\x61\x18\xbe\ +\x6b\xab\xaf\x55\x57\x28\x14\x2e\x30\xc3\xbf\xb2\x56\xcd\xac\x75\ +\x11\x00\xf4\x28\xa5\x76\x58\x68\x1b\x26\x49\x25\x00\xb1\x3b\xcf\ +\xf3\x1e\x47\xc4\xf5\xb6\x4e\x89\x68\x85\xd6\xfa\x2d\x5b\xfd\xf1\ +\x74\xa6\xa9\xe2\x7b\x94\xcb\x8f\xb7\x76\x8e\xdf\x4f\x11\x51\x8f\ +\xd6\xfa\x13\x0b\x6d\x43\x25\xa9\x05\x20\x76\x59\x2c\x16\xd7\x02\ +\xc0\x53\x75\x38\x5e\xa9\x94\x7a\xad\x0e\xfd\x9c\xd2\x7c\x3e\x7f\ +\x49\xfc\xca\xb7\x3c\xa6\xfe\xee\xea\xea\xea\x09\x82\xe0\xb3\x46\ +\x5f\x97\xcd\x7e\xa9\x06\xc0\x1c\x07\x6b\x88\xe8\x69\x1b\x73\xb1\ +\x86\x88\x1e\xd0\x5a\xbf\x6c\xab\x3f\x56\x57\x2e\x97\x2f\x33\xef\ +\x4e\x2e\xb6\xd8\x73\x02\x11\x7b\xc2\x30\xfc\xd2\x42\xdb\x14\x49\ +\xea\x01\x30\x4d\xf0\x18\x00\x6c\xa8\x23\x81\xd5\x4a\xa9\x8d\x75\ +\xe8\xff\x93\x96\x4a\xa5\x2b\xa2\x28\x8a\x5f\xf9\x17\x5a\xec\xf5\ +\x07\x11\xf5\x6a\xad\xbf\xb6\xd0\x36\x4d\x92\x09\x00\x4c\x13\x3c\ +\x4a\x44\xcf\xda\x26\x81\x88\x6b\xc3\x30\x7c\xc6\x56\x5f\x2a\x95\ +\xae\x32\xc3\x3f\x3f\xe9\x1e\x88\xf8\x7b\x14\x45\xf1\xf0\xc3\xa4\ +\xda\x66\xaf\xcf\x0c\x00\xa6\x09\x56\x03\xc0\x73\x75\x84\xb2\x4e\ +\x29\xf5\x64\x52\xbd\xef\xfb\xd7\x10\x51\xfc\xca\x3f\x37\xa9\x16\ +\x00\x7e\xed\xea\xea\xea\x0d\x82\x60\xc4\x42\xdb\x74\x49\xa6\x00\ +\x30\x10\x3c\x02\x00\xcf\xdb\x26\x83\x88\x1b\xc2\x30\x5c\x53\xab\ +\xde\xf7\xfd\xeb\xcc\xf0\xcf\xaa\x55\x33\x6b\xdd\x61\x44\xec\x0d\ +\xc3\xf0\x1b\x0b\x6d\x4b\x24\x99\x03\xc0\x1c\x07\x0f\x11\xd1\x0b\ +\xb6\x09\xc5\x5a\xad\x75\x0c\xd2\x82\x8f\x52\xa9\x54\x88\xa2\x28\ +\xfe\x78\xf7\x8c\xe3\xad\x9d\xe3\xf7\xbf\x00\x40\xaf\x52\xea\x5b\ +\x0b\x6d\xcb\x24\x99\x04\xc0\x34\xc1\x83\x00\xf0\xa2\x6d\x52\x88\ +\xb8\x29\x0c\xc3\x55\xf3\xe9\x7d\xdf\x2f\x99\x57\xfe\x69\x16\xcf\ +\x71\xc8\xdc\xf0\x8d\x59\x68\x5b\x2a\xc9\x2c\x00\xa6\x09\x56\x11\ +\xd1\x4b\x75\x24\xb6\x59\x29\x75\xcf\xb1\x7a\xdf\xf7\x6f\x30\xc3\ +\x3f\x25\xe9\xde\x88\x38\x8e\x88\x7d\x41\x10\xec\x4e\xaa\x6d\xc7\ +\xfa\x4c\x03\x10\x07\xe6\x79\xde\xfd\x88\x58\xcf\xfb\xfc\x2d\x4a\ +\xa9\xe5\x33\xe1\xfb\xbe\x7f\x93\x19\xfe\x49\x16\x03\xf9\xc9\x9c\ +\xf9\x7b\x2c\xb4\x6d\x91\x64\x1e\x00\x73\x1c\xdc\x07\x00\x9b\x6c\ +\x13\x24\xa2\x6d\x5a\xeb\x25\xc5\x62\xf1\x16\x00\x88\xef\xf6\x4f\ +\xb0\xd8\xeb\x07\x73\xe6\xef\xb5\xd0\xb6\x4d\xd2\x11\x00\x98\xe3\ +\xe0\x5e\x22\x7a\xa5\x8e\x24\xe3\x6f\x20\xe3\x3f\x3c\x71\x2c\xf6\ +\x38\x60\xce\xfc\x7d\x16\xda\xb6\x4a\x3a\x06\x00\x73\x1c\xac\x44\ +\xc4\xf8\x6f\x07\x5b\xf6\x20\xa2\xfd\xb9\x5c\xae\x77\x78\x78\x78\ +\x7f\xcb\x9e\xb4\x81\x4f\xd4\x51\x00\x98\x26\xb8\x9b\x88\x1a\xfe\ +\x05\xd0\x3c\x99\xef\x33\x1f\xf2\x1c\x68\xe0\x4c\x5a\xba\x55\xc7\ +\x01\x60\x9a\xe0\x2e\x44\xdc\xdc\xe4\x24\xf7\x12\x51\x9f\xd6\xfa\ +\x60\x93\x9f\xa7\xa9\xdb\x77\x24\x00\xe6\xc6\xf0\x4e\x00\x78\xbd\ +\x49\xe9\xed\x89\xa2\xa8\x6f\x64\x64\xe4\xc7\x26\xed\xdf\xb2\x6d\ +\x3b\x16\x00\x73\x1c\xac\x20\xa2\x37\x1a\x9c\xe6\xee\x6a\xb5\xda\ +\x57\xa9\x54\xc6\x1b\xbc\x6f\x5b\xb6\xeb\x68\x00\xcc\x71\xb0\x1c\ +\x11\xdf\x6c\x44\xba\x88\xb8\xcb\x7c\xc8\x73\xa8\x11\xfb\xa5\x61\ +\x8f\x8e\x07\xc0\x1c\x07\x77\x00\xc0\x96\x3a\x03\x1f\x8d\x87\x1f\ +\x86\x61\xfc\x19\x7f\xc7\x3c\x58\x00\x60\x8e\x83\x65\x44\xb4\xd5\ +\x72\x72\x15\x73\xc3\x77\xd8\x52\x9f\x5a\x19\x1b\x00\x4c\x13\x2c\ +\x05\x80\xb7\x13\x4e\x43\x4f\x4e\x4e\xf6\x8f\x8e\x8e\x1e\x49\xa8\ +\xcb\xc4\x72\x56\x00\x98\x26\x58\x42\x44\xef\xd4\x38\x9d\xc0\x71\ +\x9c\xfe\xe1\xe1\xe1\xdf\x6a\x5c\x9f\xb9\x65\xec\x00\x30\x37\x86\ +\x03\x88\xb8\xe0\xff\x0d\x20\xe2\x57\x44\xd4\xaf\x94\x3a\x9a\xb9\ +\xa9\x26\xb8\x60\x96\x00\x98\xe3\xe0\x76\x00\x78\x6f\x9e\xac\xbe\ +\x30\x6f\xf5\xfe\x4c\x90\x65\x26\x97\xb2\x05\xc0\x1c\x07\xfd\xe6\ +\xab\xdf\xd9\xc3\xfb\x74\x62\x62\xa2\x6f\x6c\x6c\x2c\xfe\x5f\xc3\ +\x8e\x7f\xb0\x06\xc0\x1c\x07\xbd\x88\xf8\x41\xfc\x33\x11\x7d\xdc\ +\xdd\xdd\xdd\x37\x34\x34\xf4\x4f\xc7\x4f\xde\x18\x64\x0f\x80\x39\ +\x0e\x7a\x10\xf1\xb6\xa9\xa9\xa9\xfe\x4a\xa5\x52\xe5\x32\xfc\xd8\ +\xa7\x00\xf0\xff\xb4\xe3\x2c\x88\xd3\xf0\x05\x00\x6e\xd3\x9e\xc3\ +\xaf\x34\x00\x73\x08\x04\x00\x01\x80\x79\x02\xcc\xed\x4b\x03\x08\ +\x00\xcc\x13\x60\x6e\x5f\x1a\x40\x00\x60\x9e\x00\x73\xfb\xd2\x00\ +\x02\x00\xf3\x04\x98\xdb\x97\x06\x10\x00\x98\x27\xc0\xdc\xbe\x34\ +\x80\x00\xc0\x3c\x01\xe6\xf6\xa5\x01\x04\x00\xe6\x09\x30\xb7\x2f\ +\x0d\x20\x00\x30\x4f\x80\xb9\x7d\x69\x00\x01\x80\x79\x02\xcc\xed\ +\x4b\x03\x08\x00\xcc\x13\x60\x6e\x5f\x1a\x40\x00\x60\x9e\x00\x73\ +\xfb\xd2\x00\x02\x00\xf3\x04\x98\xdb\x97\x06\x10\x00\x98\x27\xc0\ +\xdc\xbe\x34\x80\x00\xc0\x3c\x01\xe6\xf6\xa5\x01\x04\x00\xe6\x09\ +\x30\xb7\x2f\x0d\x20\x00\x30\x4f\x80\xb9\x7d\x69\x00\x01\x80\x79\ +\x02\xcc\xed\x4b\x03\x08\x00\xcc\x13\x60\x6e\x5f\x1a\x40\x00\x60\ +\x9e\x00\x73\xfb\xd2\x00\x02\x00\xf3\x04\x98\xdb\x97\x06\x10\x00\ +\x98\x27\xc0\xdc\xbe\x34\x80\x00\xc0\x3c\x01\xe6\xf6\xa5\x01\x98\ +\x03\xf0\x2f\x1a\xf0\xdc\x90\x9e\x40\x3c\x9b\x00\x00\x00\x00\x49\ +\x45\x4e\x44\xae\x42\x60\x82\ +" + +qt_resource_name = b"\ +\x00\x07\ +\x07\x3b\xe0\xb3\ +\x00\x70\ +\x00\x6c\x00\x75\x00\x67\x00\x69\x00\x6e\x00\x73\ +\x00\x06\ +\x05\x04\x66\x45\ +\x00\x49\ +\x00\x6e\x00\x5f\x00\x6f\x00\x6e\x00\x65\ +\x00\x03\ +\x00\x00\x76\xf3\ +\x00\x70\ +\x00\x69\x00\x63\ +\x00\x08\ +\x09\xe6\x72\x67\ +\x7b\xad\ +\x59\x34\x00\x20\x53\xf3\x00\x2e\x00\x73\x00\x76\x00\x67\ +\x00\x0b\ +\x0f\x8a\xc9\x87\ +\x7b\xad\ +\x59\x34\x00\x5f\x52\x17\x88\x68\x54\x11\x53\xf3\x00\x2e\x00\x70\x00\x6e\x00\x67\ +\x00\x08\ +\x04\x1e\x72\x67\ +\x7b\xad\ +\x59\x34\x00\x20\x4e\x0b\x00\x2e\x00\x73\x00\x76\x00\x67\ +\x00\x0b\ +\x0e\xdf\xc8\xa7\ +\x7b\xad\ +\x59\x34\x00\x5f\x52\x17\x88\x68\x5c\x55\x5f\x00\x00\x2e\x00\x70\x00\x6e\x00\x67\ +" + +qt_resource_struct_v1 = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ +\x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ +\x00\x00\x00\x26\x00\x02\x00\x00\x00\x04\x00\x00\x00\x04\ +\x00\x00\x00\x64\x00\x00\x00\x00\x00\x01\x00\x00\x0a\x32\ +\x00\x00\x00\x32\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x00\x7a\x00\x00\x00\x00\x00\x01\x00\x00\x0f\x43\ +\x00\x00\x00\x48\x00\x00\x00\x00\x00\x01\x00\x00\x05\x36\ +" + +qt_resource_struct_v2 = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x26\x00\x02\x00\x00\x00\x04\x00\x00\x00\x04\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x64\x00\x00\x00\x00\x00\x01\x00\x00\x0a\x32\ +\x00\x00\x01\x81\x5b\xf7\x7e\xef\ +\x00\x00\x00\x32\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x01\x81\x5b\xf7\x72\x92\ +\x00\x00\x00\x7a\x00\x00\x00\x00\x00\x01\x00\x00\x0f\x43\ +\x00\x00\x01\x81\x5b\xfc\x68\x05\ +\x00\x00\x00\x48\x00\x00\x00\x00\x00\x01\x00\x00\x05\x36\ +\x00\x00\x01\x81\x5b\xfc\x85\xb4\ +" + +qt_version = [int(v) for v in QtCore.qVersion().split('.')] +if qt_version < [5, 8, 0]: + rcc_version = 1 + qt_resource_struct = qt_resource_struct_v1 +else: + rcc_version = 2 + qt_resource_struct = qt_resource_struct_v2 + +def qInitResources(): + QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) + +def qCleanupResources(): + QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) + +qInitResources() diff --git a/plugins/veg_method/readme.md b/plugins/veg_method/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/plugins/veg_method/scripts/ACD.py b/plugins/veg_method/scripts/ACD.py new file mode 100644 index 0000000..885ef06 --- /dev/null +++ b/plugins/veg_method/scripts/ACD.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _ACD +else: + import _ACD + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _ACD.CV_VERSION_MAJOR +CV_VERSION_MINOR = _ACD.CV_VERSION_MINOR +CV_VERSION_REVISION = _ACD.CV_VERSION_REVISION +CV_VERSION_STATUS = _ACD.CV_VERSION_STATUS +CV_VERSION = _ACD.CV_VERSION +CV_MAJOR_VERSION = _ACD.CV_MAJOR_VERSION +CV_MINOR_VERSION = _ACD.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _ACD.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_bool_generic_type + channels = _ACD.DataType_bool_channels + fmt = _ACD.DataType_bool_fmt + + def __init__(self): + _ACD.DataType_bool_swiginit(self, _ACD.new_DataType_bool()) + __swig_destroy__ = _ACD.delete_DataType_bool + +# Register DataType_bool in _ACD: +_ACD.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_uchar_generic_type + channels = _ACD.DataType_uchar_channels + fmt = _ACD.DataType_uchar_fmt + + def __init__(self): + _ACD.DataType_uchar_swiginit(self, _ACD.new_DataType_uchar()) + __swig_destroy__ = _ACD.delete_DataType_uchar + +# Register DataType_uchar in _ACD: +_ACD.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_schar_generic_type + channels = _ACD.DataType_schar_channels + fmt = _ACD.DataType_schar_fmt + + def __init__(self): + _ACD.DataType_schar_swiginit(self, _ACD.new_DataType_schar()) + __swig_destroy__ = _ACD.delete_DataType_schar + +# Register DataType_schar in _ACD: +_ACD.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_char_generic_type + channels = _ACD.DataType_char_channels + fmt = _ACD.DataType_char_fmt + + def __init__(self): + _ACD.DataType_char_swiginit(self, _ACD.new_DataType_char()) + __swig_destroy__ = _ACD.delete_DataType_char + +# Register DataType_char in _ACD: +_ACD.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_ushort_generic_type + channels = _ACD.DataType_ushort_channels + fmt = _ACD.DataType_ushort_fmt + + def __init__(self): + _ACD.DataType_ushort_swiginit(self, _ACD.new_DataType_ushort()) + __swig_destroy__ = _ACD.delete_DataType_ushort + +# Register DataType_ushort in _ACD: +_ACD.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_short_generic_type + channels = _ACD.DataType_short_channels + fmt = _ACD.DataType_short_fmt + + def __init__(self): + _ACD.DataType_short_swiginit(self, _ACD.new_DataType_short()) + __swig_destroy__ = _ACD.delete_DataType_short + +# Register DataType_short in _ACD: +_ACD.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_int_generic_type + channels = _ACD.DataType_int_channels + fmt = _ACD.DataType_int_fmt + + def __init__(self): + _ACD.DataType_int_swiginit(self, _ACD.new_DataType_int()) + __swig_destroy__ = _ACD.delete_DataType_int + +# Register DataType_int in _ACD: +_ACD.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_float_generic_type + channels = _ACD.DataType_float_channels + fmt = _ACD.DataType_float_fmt + + def __init__(self): + _ACD.DataType_float_swiginit(self, _ACD.new_DataType_float()) + __swig_destroy__ = _ACD.delete_DataType_float + +# Register DataType_float in _ACD: +_ACD.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD.DataType_double_generic_type + channels = _ACD.DataType_double_channels + fmt = _ACD.DataType_double_fmt + + def __init__(self): + _ACD.DataType_double_swiginit(self, _ACD.new_DataType_double()) + __swig_destroy__ = _ACD.delete_DataType_double + +# Register DataType_double in _ACD: +_ACD.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD.Range_swiginit(self, _ACD.new_Range(*args)) + + def size(self): + return _ACD.Range_size(self) + + def empty(self): + return _ACD.Range_empty(self) + + @staticmethod + def all(): + return _ACD.Range_all() + start = property(_ACD.Range_start_get, _ACD.Range_start_set) + end = property(_ACD.Range_end_get, _ACD.Range_end_set) + __swig_destroy__ = _ACD.delete_Range + +# Register Range in _ACD: +_ACD.Range_swigregister(Range) + +def Range_all(): + return _ACD.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _ACD.delete_SwigPyIterator + + def value(self): + return _ACD.SwigPyIterator_value(self) + + def incr(self, n=1): + return _ACD.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _ACD.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _ACD.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _ACD.SwigPyIterator_equal(self, x) + + def copy(self): + return _ACD.SwigPyIterator_copy(self) + + def next(self): + return _ACD.SwigPyIterator_next(self) + + def __next__(self): + return _ACD.SwigPyIterator___next__(self) + + def previous(self): + return _ACD.SwigPyIterator_previous(self) + + def advance(self, n): + return _ACD.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _ACD.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _ACD.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _ACD.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _ACD.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _ACD.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _ACD.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _ACD: +_ACD.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_AddOp_swiginit(self, _ACD.new_Matx_AddOp()) + __swig_destroy__ = _ACD.delete_Matx_AddOp + +# Register Matx_AddOp in _ACD: +_ACD.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_SubOp_swiginit(self, _ACD.new_Matx_SubOp()) + __swig_destroy__ = _ACD.delete_Matx_SubOp + +# Register Matx_SubOp in _ACD: +_ACD.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_ScaleOp_swiginit(self, _ACD.new_Matx_ScaleOp()) + __swig_destroy__ = _ACD.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _ACD: +_ACD.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_MulOp_swiginit(self, _ACD.new_Matx_MulOp()) + __swig_destroy__ = _ACD.delete_Matx_MulOp + +# Register Matx_MulOp in _ACD: +_ACD.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_DivOp_swiginit(self, _ACD.new_Matx_DivOp()) + __swig_destroy__ = _ACD.delete_Matx_DivOp + +# Register Matx_DivOp in _ACD: +_ACD.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_MatMulOp_swiginit(self, _ACD.new_Matx_MatMulOp()) + __swig_destroy__ = _ACD.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _ACD: +_ACD.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD.Matx_TOp_swiginit(self, _ACD.new_Matx_TOp()) + __swig_destroy__ = _ACD.delete_Matx_TOp + +# Register Matx_TOp in _ACD: +_ACD.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _ACD.delete_Mat + + def row(self, y): + return _ACD.Mat_row(self, y) + + def col(self, x): + return _ACD.Mat_col(self, x) + + def rowRange(self, *args): + return _ACD.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _ACD.Mat_colRange(self, *args) + + def diag(self, d=0): + return _ACD.Mat_diag(self, d) + + def clone(self): + return _ACD.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _ACD.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _ACD.Mat_reshape(self, *args) + + def create(self, *args): + return _ACD.Mat_create(self, *args) + + def addref(self): + return _ACD.Mat_addref(self) + + def release(self): + return _ACD.Mat_release(self) + + def deallocate(self): + return _ACD.Mat_deallocate(self) + + def copySize(self, m): + return _ACD.Mat_copySize(self, m) + + def reserve(self, sz): + return _ACD.Mat_reserve(self, sz) + + def resize(self, *args): + return _ACD.Mat_resize(self, *args) + + def push_back_(self, elem): + return _ACD.Mat_push_back_(self, elem) + + def push_back(self, m): + return _ACD.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _ACD.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _ACD.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD.Mat___call__(self, *args) + + def isContinuous(self): + return _ACD.Mat_isContinuous(self) + + def isSubmatrix(self): + return _ACD.Mat_isSubmatrix(self) + + def elemSize(self): + return _ACD.Mat_elemSize(self) + + def elemSize1(self): + return _ACD.Mat_elemSize1(self) + + def type(self): + return _ACD.Mat_type(self) + + def depth(self): + return _ACD.Mat_depth(self) + + def channels(self): + return _ACD.Mat_channels(self) + + def step1(self, i=0): + return _ACD.Mat_step1(self, i) + + def empty(self): + return _ACD.Mat_empty(self) + + def total(self): + return _ACD.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _ACD.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _ACD.Mat_ptr(self, *args) + MAGIC_VAL = _ACD.Mat_MAGIC_VAL + AUTO_STEP = _ACD.Mat_AUTO_STEP + CONTINUOUS_FLAG = _ACD.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _ACD.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _ACD.Mat_MAGIC_MASK + TYPE_MASK = _ACD.Mat_TYPE_MASK + DEPTH_MASK = _ACD.Mat_DEPTH_MASK + flags = property(_ACD.Mat_flags_get, _ACD.Mat_flags_set) + dims = property(_ACD.Mat_dims_get, _ACD.Mat_dims_set) + rows = property(_ACD.Mat_rows_get, _ACD.Mat_rows_set) + cols = property(_ACD.Mat_cols_get, _ACD.Mat_cols_set) + data = property(_ACD.Mat_data_get, _ACD.Mat_data_set) + datastart = property(_ACD.Mat_datastart_get, _ACD.Mat_datastart_set) + dataend = property(_ACD.Mat_dataend_get, _ACD.Mat_dataend_set) + datalimit = property(_ACD.Mat_datalimit_get, _ACD.Mat_datalimit_set) + + def __init__(self, *args): + _ACD.Mat_swiginit(self, _ACD.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD.Mat___str__(self) + +# Register Mat in _ACD: +_ACD.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _ACD._cv_numpy_sizeof_uint8_t_swiginit(self, _ACD.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _ACD: +_ACD._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _ACD.uint8_tArray___bool__(self) + + def __len__(self): + return _ACD.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _ACD.uint8_tArray_pop(self) + + def append(self, x): + return _ACD.uint8_tArray_append(self, x) + + def empty(self): + return _ACD.uint8_tArray_empty(self) + + def size(self): + return _ACD.uint8_tArray_size(self) + + def swap(self, v): + return _ACD.uint8_tArray_swap(self, v) + + def begin(self): + return _ACD.uint8_tArray_begin(self) + + def end(self): + return _ACD.uint8_tArray_end(self) + + def rbegin(self): + return _ACD.uint8_tArray_rbegin(self) + + def rend(self): + return _ACD.uint8_tArray_rend(self) + + def clear(self): + return _ACD.uint8_tArray_clear(self) + + def get_allocator(self): + return _ACD.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _ACD.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _ACD.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _ACD.uint8_tArray_swiginit(self, _ACD.new_uint8_tArray(*args)) + + def push_back(self, x): + return _ACD.uint8_tArray_push_back(self, x) + + def front(self): + return _ACD.uint8_tArray_front(self) + + def back(self): + return _ACD.uint8_tArray_back(self) + + def assign(self, n, x): + return _ACD.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _ACD.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _ACD.uint8_tArray_reserve(self, n) + + def capacity(self): + return _ACD.uint8_tArray_capacity(self) + __swig_destroy__ = _ACD.delete_uint8_tArray + +# Register uint8_tArray in _ACD: +_ACD.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_uint8_t_2_1_rows + cols = _ACD._Matx_uint8_t_2_1_cols + channels = _ACD._Matx_uint8_t_2_1_channels + shortdim = _ACD._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_ACD._Matx_uint8_t_2_1_val_get, _ACD._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_uint8_t_2_1_swiginit(self, _ACD.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _ACD: +_ACD._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _ACD._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _ACD._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _ACD._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _ACD._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _ACD._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _ACD._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_uint8_t_2_swiginit(self, _ACD.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _ACD: +_ACD._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _ACD._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_uint8_t_2_generic_type + channels = _ACD._DataType_Vec_uint8_t_2_channels + fmt = _ACD._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _ACD._DataType_Vec_uint8_t_2_swiginit(self, _ACD.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _ACD: +_ACD._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_uint8_t_3_1_rows + cols = _ACD._Matx_uint8_t_3_1_cols + channels = _ACD._Matx_uint8_t_3_1_channels + shortdim = _ACD._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_ACD._Matx_uint8_t_3_1_val_get, _ACD._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_uint8_t_3_1_swiginit(self, _ACD.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _ACD: +_ACD._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _ACD._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _ACD._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _ACD._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _ACD._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _ACD._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _ACD._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_uint8_t_3_swiginit(self, _ACD.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _ACD: +_ACD._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _ACD._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_uint8_t_3_generic_type + channels = _ACD._DataType_Vec_uint8_t_3_channels + fmt = _ACD._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _ACD._DataType_Vec_uint8_t_3_swiginit(self, _ACD.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _ACD: +_ACD._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_uint8_t_4_1_rows + cols = _ACD._Matx_uint8_t_4_1_cols + channels = _ACD._Matx_uint8_t_4_1_channels + shortdim = _ACD._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_ACD._Matx_uint8_t_4_1_val_get, _ACD._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_uint8_t_4_1_swiginit(self, _ACD.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _ACD: +_ACD._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _ACD._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _ACD._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _ACD._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _ACD._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _ACD._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _ACD._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_uint8_t_4_swiginit(self, _ACD.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _ACD: +_ACD._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _ACD._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_uint8_t_4_generic_type + channels = _ACD._DataType_Vec_uint8_t_4_channels + fmt = _ACD._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _ACD._DataType_Vec_uint8_t_4_swiginit(self, _ACD.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _ACD: +_ACD._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_short_value + + def __init__(self): + _ACD._cv_numpy_sizeof_short_swiginit(self, _ACD.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _ACD: +_ACD._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.shortArray___nonzero__(self) + + def __bool__(self): + return _ACD.shortArray___bool__(self) + + def __len__(self): + return _ACD.shortArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.shortArray___setitem__(self, *args) + + def pop(self): + return _ACD.shortArray_pop(self) + + def append(self, x): + return _ACD.shortArray_append(self, x) + + def empty(self): + return _ACD.shortArray_empty(self) + + def size(self): + return _ACD.shortArray_size(self) + + def swap(self, v): + return _ACD.shortArray_swap(self, v) + + def begin(self): + return _ACD.shortArray_begin(self) + + def end(self): + return _ACD.shortArray_end(self) + + def rbegin(self): + return _ACD.shortArray_rbegin(self) + + def rend(self): + return _ACD.shortArray_rend(self) + + def clear(self): + return _ACD.shortArray_clear(self) + + def get_allocator(self): + return _ACD.shortArray_get_allocator(self) + + def pop_back(self): + return _ACD.shortArray_pop_back(self) + + def erase(self, *args): + return _ACD.shortArray_erase(self, *args) + + def __init__(self, *args): + _ACD.shortArray_swiginit(self, _ACD.new_shortArray(*args)) + + def push_back(self, x): + return _ACD.shortArray_push_back(self, x) + + def front(self): + return _ACD.shortArray_front(self) + + def back(self): + return _ACD.shortArray_back(self) + + def assign(self, n, x): + return _ACD.shortArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.shortArray_resize(self, *args) + + def insert(self, *args): + return _ACD.shortArray_insert(self, *args) + + def reserve(self, n): + return _ACD.shortArray_reserve(self, n) + + def capacity(self): + return _ACD.shortArray_capacity(self) + __swig_destroy__ = _ACD.delete_shortArray + +# Register shortArray in _ACD: +_ACD.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_short_2_1_rows + cols = _ACD._Matx_short_2_1_cols + channels = _ACD._Matx_short_2_1_channels + shortdim = _ACD._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_short_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_short_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_short_2_1___call__(self, i, j) + val = property(_ACD._Matx_short_2_1_val_get, _ACD._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_short_2_1_swiginit(self, _ACD.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_short_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _ACD: +_ACD._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _ACD._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _ACD._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _ACD._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _ACD._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _ACD._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _ACD._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_short_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_short_2_swiginit(self, _ACD.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_short_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_short_2 + +# Register _Vec_short_2 in _ACD: +_ACD._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _ACD._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_short_2_generic_type + channels = _ACD._DataType_Vec_short_2_channels + fmt = _ACD._DataType_Vec_short_2_fmt + + def __init__(self): + _ACD._DataType_Vec_short_2_swiginit(self, _ACD.new__DataType_Vec_short_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _ACD: +_ACD._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_short_3_1_rows + cols = _ACD._Matx_short_3_1_cols + channels = _ACD._Matx_short_3_1_channels + shortdim = _ACD._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_short_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_short_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_short_3_1___call__(self, i, j) + val = property(_ACD._Matx_short_3_1_val_get, _ACD._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_short_3_1_swiginit(self, _ACD.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_short_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _ACD: +_ACD._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _ACD._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _ACD._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _ACD._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _ACD._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _ACD._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _ACD._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_short_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_short_3_swiginit(self, _ACD.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_short_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_short_3 + +# Register _Vec_short_3 in _ACD: +_ACD._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _ACD._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_short_3_generic_type + channels = _ACD._DataType_Vec_short_3_channels + fmt = _ACD._DataType_Vec_short_3_fmt + + def __init__(self): + _ACD._DataType_Vec_short_3_swiginit(self, _ACD.new__DataType_Vec_short_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _ACD: +_ACD._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_short_4_1_rows + cols = _ACD._Matx_short_4_1_cols + channels = _ACD._Matx_short_4_1_channels + shortdim = _ACD._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_short_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_short_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_short_4_1___call__(self, i, j) + val = property(_ACD._Matx_short_4_1_val_get, _ACD._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_short_4_1_swiginit(self, _ACD.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_short_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _ACD: +_ACD._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _ACD._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _ACD._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _ACD._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _ACD._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _ACD._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _ACD._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_short_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_short_4_swiginit(self, _ACD.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_short_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_short_4 + +# Register _Vec_short_4 in _ACD: +_ACD._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _ACD._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_short_4_generic_type + channels = _ACD._DataType_Vec_short_4_channels + fmt = _ACD._DataType_Vec_short_4_fmt + + def __init__(self): + _ACD._DataType_Vec_short_4_swiginit(self, _ACD.new__DataType_Vec_short_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _ACD: +_ACD._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_ushort_value + + def __init__(self): + _ACD._cv_numpy_sizeof_ushort_swiginit(self, _ACD.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _ACD: +_ACD._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.ushortArray___nonzero__(self) + + def __bool__(self): + return _ACD.ushortArray___bool__(self) + + def __len__(self): + return _ACD.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.ushortArray___setitem__(self, *args) + + def pop(self): + return _ACD.ushortArray_pop(self) + + def append(self, x): + return _ACD.ushortArray_append(self, x) + + def empty(self): + return _ACD.ushortArray_empty(self) + + def size(self): + return _ACD.ushortArray_size(self) + + def swap(self, v): + return _ACD.ushortArray_swap(self, v) + + def begin(self): + return _ACD.ushortArray_begin(self) + + def end(self): + return _ACD.ushortArray_end(self) + + def rbegin(self): + return _ACD.ushortArray_rbegin(self) + + def rend(self): + return _ACD.ushortArray_rend(self) + + def clear(self): + return _ACD.ushortArray_clear(self) + + def get_allocator(self): + return _ACD.ushortArray_get_allocator(self) + + def pop_back(self): + return _ACD.ushortArray_pop_back(self) + + def erase(self, *args): + return _ACD.ushortArray_erase(self, *args) + + def __init__(self, *args): + _ACD.ushortArray_swiginit(self, _ACD.new_ushortArray(*args)) + + def push_back(self, x): + return _ACD.ushortArray_push_back(self, x) + + def front(self): + return _ACD.ushortArray_front(self) + + def back(self): + return _ACD.ushortArray_back(self) + + def assign(self, n, x): + return _ACD.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.ushortArray_resize(self, *args) + + def insert(self, *args): + return _ACD.ushortArray_insert(self, *args) + + def reserve(self, n): + return _ACD.ushortArray_reserve(self, n) + + def capacity(self): + return _ACD.ushortArray_capacity(self) + __swig_destroy__ = _ACD.delete_ushortArray + +# Register ushortArray in _ACD: +_ACD.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_ushort_2_1_rows + cols = _ACD._Matx_ushort_2_1_cols + channels = _ACD._Matx_ushort_2_1_channels + shortdim = _ACD._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_ushort_2_1___call__(self, i, j) + val = property(_ACD._Matx_ushort_2_1_val_get, _ACD._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_ushort_2_1_swiginit(self, _ACD.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _ACD: +_ACD._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _ACD._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _ACD._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _ACD._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _ACD._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _ACD._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _ACD._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_ushort_2_swiginit(self, _ACD.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_ushort_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _ACD: +_ACD._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _ACD._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_ushort_2_generic_type + channels = _ACD._DataType_Vec_ushort_2_channels + fmt = _ACD._DataType_Vec_ushort_2_fmt + + def __init__(self): + _ACD._DataType_Vec_ushort_2_swiginit(self, _ACD.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _ACD: +_ACD._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_ushort_3_1_rows + cols = _ACD._Matx_ushort_3_1_cols + channels = _ACD._Matx_ushort_3_1_channels + shortdim = _ACD._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_ushort_3_1___call__(self, i, j) + val = property(_ACD._Matx_ushort_3_1_val_get, _ACD._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_ushort_3_1_swiginit(self, _ACD.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _ACD: +_ACD._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _ACD._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _ACD._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _ACD._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _ACD._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _ACD._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _ACD._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_ushort_3_swiginit(self, _ACD.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_ushort_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _ACD: +_ACD._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _ACD._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_ushort_3_generic_type + channels = _ACD._DataType_Vec_ushort_3_channels + fmt = _ACD._DataType_Vec_ushort_3_fmt + + def __init__(self): + _ACD._DataType_Vec_ushort_3_swiginit(self, _ACD.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _ACD: +_ACD._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_ushort_4_1_rows + cols = _ACD._Matx_ushort_4_1_cols + channels = _ACD._Matx_ushort_4_1_channels + shortdim = _ACD._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_ushort_4_1___call__(self, i, j) + val = property(_ACD._Matx_ushort_4_1_val_get, _ACD._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_ushort_4_1_swiginit(self, _ACD.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _ACD: +_ACD._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _ACD._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _ACD._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _ACD._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _ACD._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _ACD._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _ACD._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_ushort_4_swiginit(self, _ACD.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_ushort_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _ACD: +_ACD._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _ACD._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_ushort_4_generic_type + channels = _ACD._DataType_Vec_ushort_4_channels + fmt = _ACD._DataType_Vec_ushort_4_fmt + + def __init__(self): + _ACD._DataType_Vec_ushort_4_swiginit(self, _ACD.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _ACD: +_ACD._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_int_value + + def __init__(self): + _ACD._cv_numpy_sizeof_int_swiginit(self, _ACD.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _ACD: +_ACD._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.intArray___nonzero__(self) + + def __bool__(self): + return _ACD.intArray___bool__(self) + + def __len__(self): + return _ACD.intArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.intArray___setitem__(self, *args) + + def pop(self): + return _ACD.intArray_pop(self) + + def append(self, x): + return _ACD.intArray_append(self, x) + + def empty(self): + return _ACD.intArray_empty(self) + + def size(self): + return _ACD.intArray_size(self) + + def swap(self, v): + return _ACD.intArray_swap(self, v) + + def begin(self): + return _ACD.intArray_begin(self) + + def end(self): + return _ACD.intArray_end(self) + + def rbegin(self): + return _ACD.intArray_rbegin(self) + + def rend(self): + return _ACD.intArray_rend(self) + + def clear(self): + return _ACD.intArray_clear(self) + + def get_allocator(self): + return _ACD.intArray_get_allocator(self) + + def pop_back(self): + return _ACD.intArray_pop_back(self) + + def erase(self, *args): + return _ACD.intArray_erase(self, *args) + + def __init__(self, *args): + _ACD.intArray_swiginit(self, _ACD.new_intArray(*args)) + + def push_back(self, x): + return _ACD.intArray_push_back(self, x) + + def front(self): + return _ACD.intArray_front(self) + + def back(self): + return _ACD.intArray_back(self) + + def assign(self, n, x): + return _ACD.intArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.intArray_resize(self, *args) + + def insert(self, *args): + return _ACD.intArray_insert(self, *args) + + def reserve(self, n): + return _ACD.intArray_reserve(self, n) + + def capacity(self): + return _ACD.intArray_capacity(self) + __swig_destroy__ = _ACD.delete_intArray + +# Register intArray in _ACD: +_ACD.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_2_1_rows + cols = _ACD._Matx_int_2_1_cols + channels = _ACD._Matx_int_2_1_channels + shortdim = _ACD._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_2_1___call__(self, i, j) + val = property(_ACD._Matx_int_2_1_val_get, _ACD._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_2_1_swiginit(self, _ACD.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _ACD: +_ACD._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _ACD._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _ACD._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _ACD._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _ACD._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _ACD._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _ACD._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_2_swiginit(self, _ACD.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_2 + +# Register _Vec_int_2 in _ACD: +_ACD._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _ACD._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_2_generic_type + channels = _ACD._DataType_Vec_int_2_channels + fmt = _ACD._DataType_Vec_int_2_fmt + + def __init__(self): + _ACD._DataType_Vec_int_2_swiginit(self, _ACD.new__DataType_Vec_int_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _ACD: +_ACD._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_3_1_rows + cols = _ACD._Matx_int_3_1_cols + channels = _ACD._Matx_int_3_1_channels + shortdim = _ACD._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_3_1___call__(self, i, j) + val = property(_ACD._Matx_int_3_1_val_get, _ACD._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_3_1_swiginit(self, _ACD.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _ACD: +_ACD._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _ACD._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _ACD._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _ACD._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _ACD._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _ACD._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _ACD._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_3_swiginit(self, _ACD.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_3 + +# Register _Vec_int_3 in _ACD: +_ACD._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _ACD._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_3_generic_type + channels = _ACD._DataType_Vec_int_3_channels + fmt = _ACD._DataType_Vec_int_3_fmt + + def __init__(self): + _ACD._DataType_Vec_int_3_swiginit(self, _ACD.new__DataType_Vec_int_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _ACD: +_ACD._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_4_1_rows + cols = _ACD._Matx_int_4_1_cols + channels = _ACD._Matx_int_4_1_channels + shortdim = _ACD._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_4_1___call__(self, i, j) + val = property(_ACD._Matx_int_4_1_val_get, _ACD._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_4_1_swiginit(self, _ACD.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _ACD: +_ACD._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _ACD._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _ACD._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _ACD._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _ACD._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _ACD._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _ACD._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_4_swiginit(self, _ACD.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_4 + +# Register _Vec_int_4 in _ACD: +_ACD._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _ACD._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_4_generic_type + channels = _ACD._DataType_Vec_int_4_channels + fmt = _ACD._DataType_Vec_int_4_fmt + + def __init__(self): + _ACD._DataType_Vec_int_4_swiginit(self, _ACD.new__DataType_Vec_int_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _ACD: +_ACD._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_6_1_rows + cols = _ACD._Matx_int_6_1_cols + channels = _ACD._Matx_int_6_1_channels + shortdim = _ACD._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_6_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_6_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_6_1___call__(self, i, j) + val = property(_ACD._Matx_int_6_1_val_get, _ACD._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_6_1_swiginit(self, _ACD.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_6_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _ACD: +_ACD._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _ACD._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _ACD._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _ACD._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _ACD._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _ACD._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _ACD._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_6_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_6_swiginit(self, _ACD.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_6___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_6 + +# Register _Vec_int_6 in _ACD: +_ACD._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _ACD._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_6_generic_type + channels = _ACD._DataType_Vec_int_6_channels + fmt = _ACD._DataType_Vec_int_6_fmt + + def __init__(self): + _ACD._DataType_Vec_int_6_swiginit(self, _ACD.new__DataType_Vec_int_6()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _ACD: +_ACD._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_int_8_1_rows + cols = _ACD._Matx_int_8_1_cols + channels = _ACD._Matx_int_8_1_channels + shortdim = _ACD._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_int_8_1_ddot(self, v) + + def t(self): + return _ACD._Matx_int_8_1_t(self) + + def mul(self, a): + return _ACD._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_int_8_1___call__(self, i, j) + val = property(_ACD._Matx_int_8_1_val_get, _ACD._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_int_8_1_swiginit(self, _ACD.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_int_8_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _ACD: +_ACD._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _ACD._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _ACD._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _ACD._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _ACD._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _ACD._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _ACD._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_int_8_all(alpha) + + def mul(self, v): + return _ACD._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_int_8_swiginit(self, _ACD.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_int_8___str__(self) + __swig_destroy__ = _ACD.delete__Vec_int_8 + +# Register _Vec_int_8 in _ACD: +_ACD._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _ACD._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_int_8_generic_type + channels = _ACD._DataType_Vec_int_8_channels + fmt = _ACD._DataType_Vec_int_8_fmt + + def __init__(self): + _ACD._DataType_Vec_int_8_swiginit(self, _ACD.new__DataType_Vec_int_8()) + __swig_destroy__ = _ACD.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _ACD: +_ACD._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_float_value + + def __init__(self): + _ACD._cv_numpy_sizeof_float_swiginit(self, _ACD.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _ACD: +_ACD._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.floatArray___nonzero__(self) + + def __bool__(self): + return _ACD.floatArray___bool__(self) + + def __len__(self): + return _ACD.floatArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.floatArray___setitem__(self, *args) + + def pop(self): + return _ACD.floatArray_pop(self) + + def append(self, x): + return _ACD.floatArray_append(self, x) + + def empty(self): + return _ACD.floatArray_empty(self) + + def size(self): + return _ACD.floatArray_size(self) + + def swap(self, v): + return _ACD.floatArray_swap(self, v) + + def begin(self): + return _ACD.floatArray_begin(self) + + def end(self): + return _ACD.floatArray_end(self) + + def rbegin(self): + return _ACD.floatArray_rbegin(self) + + def rend(self): + return _ACD.floatArray_rend(self) + + def clear(self): + return _ACD.floatArray_clear(self) + + def get_allocator(self): + return _ACD.floatArray_get_allocator(self) + + def pop_back(self): + return _ACD.floatArray_pop_back(self) + + def erase(self, *args): + return _ACD.floatArray_erase(self, *args) + + def __init__(self, *args): + _ACD.floatArray_swiginit(self, _ACD.new_floatArray(*args)) + + def push_back(self, x): + return _ACD.floatArray_push_back(self, x) + + def front(self): + return _ACD.floatArray_front(self) + + def back(self): + return _ACD.floatArray_back(self) + + def assign(self, n, x): + return _ACD.floatArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.floatArray_resize(self, *args) + + def insert(self, *args): + return _ACD.floatArray_insert(self, *args) + + def reserve(self, n): + return _ACD.floatArray_reserve(self, n) + + def capacity(self): + return _ACD.floatArray_capacity(self) + __swig_destroy__ = _ACD.delete_floatArray + +# Register floatArray in _ACD: +_ACD.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_2_1_rows + cols = _ACD._Matx_float_2_1_cols + channels = _ACD._Matx_float_2_1_channels + shortdim = _ACD._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_float_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_2_1___call__(self, i, j) + val = property(_ACD._Matx_float_2_1_val_get, _ACD._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_2_1_swiginit(self, _ACD.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _ACD: +_ACD._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _ACD._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _ACD._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _ACD._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _ACD._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _ACD._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _ACD._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_float_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_float_2_swiginit(self, _ACD.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_float_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_float_2 + +# Register _Vec_float_2 in _ACD: +_ACD._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _ACD._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_float_2_generic_type + channels = _ACD._DataType_Vec_float_2_channels + fmt = _ACD._DataType_Vec_float_2_fmt + + def __init__(self): + _ACD._DataType_Vec_float_2_swiginit(self, _ACD.new__DataType_Vec_float_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _ACD: +_ACD._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_3_1_rows + cols = _ACD._Matx_float_3_1_cols + channels = _ACD._Matx_float_3_1_channels + shortdim = _ACD._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_float_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_3_1___call__(self, i, j) + val = property(_ACD._Matx_float_3_1_val_get, _ACD._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_3_1_swiginit(self, _ACD.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _ACD: +_ACD._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _ACD._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _ACD._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _ACD._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _ACD._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _ACD._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _ACD._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_float_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_float_3_swiginit(self, _ACD.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_float_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_float_3 + +# Register _Vec_float_3 in _ACD: +_ACD._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _ACD._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_float_3_generic_type + channels = _ACD._DataType_Vec_float_3_channels + fmt = _ACD._DataType_Vec_float_3_fmt + + def __init__(self): + _ACD._DataType_Vec_float_3_swiginit(self, _ACD.new__DataType_Vec_float_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _ACD: +_ACD._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_4_1_rows + cols = _ACD._Matx_float_4_1_cols + channels = _ACD._Matx_float_4_1_channels + shortdim = _ACD._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_float_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_4_1___call__(self, i, j) + val = property(_ACD._Matx_float_4_1_val_get, _ACD._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_4_1_swiginit(self, _ACD.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _ACD: +_ACD._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _ACD._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _ACD._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _ACD._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _ACD._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _ACD._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _ACD._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_float_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_float_4_swiginit(self, _ACD.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_float_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_float_4 + +# Register _Vec_float_4 in _ACD: +_ACD._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _ACD._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_float_4_generic_type + channels = _ACD._DataType_Vec_float_4_channels + fmt = _ACD._DataType_Vec_float_4_fmt + + def __init__(self): + _ACD._DataType_Vec_float_4_swiginit(self, _ACD.new__DataType_Vec_float_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _ACD: +_ACD._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_6_1_rows + cols = _ACD._Matx_float_6_1_cols + channels = _ACD._Matx_float_6_1_channels + shortdim = _ACD._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_6_1_ddot(self, v) + + def t(self): + return _ACD._Matx_float_6_1_t(self) + + def mul(self, a): + return _ACD._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_6_1___call__(self, i, j) + val = property(_ACD._Matx_float_6_1_val_get, _ACD._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_6_1_swiginit(self, _ACD.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_6_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _ACD: +_ACD._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _ACD._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _ACD._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _ACD._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _ACD._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _ACD._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _ACD._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_float_6_all(alpha) + + def mul(self, v): + return _ACD._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_float_6_swiginit(self, _ACD.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_float_6___str__(self) + __swig_destroy__ = _ACD.delete__Vec_float_6 + +# Register _Vec_float_6 in _ACD: +_ACD._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _ACD._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_float_6_generic_type + channels = _ACD._DataType_Vec_float_6_channels + fmt = _ACD._DataType_Vec_float_6_fmt + + def __init__(self): + _ACD._DataType_Vec_float_6_swiginit(self, _ACD.new__DataType_Vec_float_6()) + __swig_destroy__ = _ACD.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _ACD: +_ACD._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_double_value + + def __init__(self): + _ACD._cv_numpy_sizeof_double_swiginit(self, _ACD.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _ACD: +_ACD._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _ACD.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _ACD.doubleArray___nonzero__(self) + + def __bool__(self): + return _ACD.doubleArray___bool__(self) + + def __len__(self): + return _ACD.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _ACD.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _ACD.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _ACD.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _ACD.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _ACD.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _ACD.doubleArray___setitem__(self, *args) + + def pop(self): + return _ACD.doubleArray_pop(self) + + def append(self, x): + return _ACD.doubleArray_append(self, x) + + def empty(self): + return _ACD.doubleArray_empty(self) + + def size(self): + return _ACD.doubleArray_size(self) + + def swap(self, v): + return _ACD.doubleArray_swap(self, v) + + def begin(self): + return _ACD.doubleArray_begin(self) + + def end(self): + return _ACD.doubleArray_end(self) + + def rbegin(self): + return _ACD.doubleArray_rbegin(self) + + def rend(self): + return _ACD.doubleArray_rend(self) + + def clear(self): + return _ACD.doubleArray_clear(self) + + def get_allocator(self): + return _ACD.doubleArray_get_allocator(self) + + def pop_back(self): + return _ACD.doubleArray_pop_back(self) + + def erase(self, *args): + return _ACD.doubleArray_erase(self, *args) + + def __init__(self, *args): + _ACD.doubleArray_swiginit(self, _ACD.new_doubleArray(*args)) + + def push_back(self, x): + return _ACD.doubleArray_push_back(self, x) + + def front(self): + return _ACD.doubleArray_front(self) + + def back(self): + return _ACD.doubleArray_back(self) + + def assign(self, n, x): + return _ACD.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _ACD.doubleArray_resize(self, *args) + + def insert(self, *args): + return _ACD.doubleArray_insert(self, *args) + + def reserve(self, n): + return _ACD.doubleArray_reserve(self, n) + + def capacity(self): + return _ACD.doubleArray_capacity(self) + __swig_destroy__ = _ACD.delete_doubleArray + +# Register doubleArray in _ACD: +_ACD.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_2_1_rows + cols = _ACD._Matx_double_2_1_cols + channels = _ACD._Matx_double_2_1_channels + shortdim = _ACD._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_2_1_ddot(self, v) + + def t(self): + return _ACD._Matx_double_2_1_t(self) + + def mul(self, a): + return _ACD._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_2_1___call__(self, i, j) + val = property(_ACD._Matx_double_2_1_val_get, _ACD._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_2_1_swiginit(self, _ACD.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_2_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _ACD: +_ACD._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _ACD._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _ACD._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _ACD._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _ACD._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _ACD._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _ACD._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_double_2_all(alpha) + + def mul(self, v): + return _ACD._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_double_2_swiginit(self, _ACD.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_double_2___str__(self) + __swig_destroy__ = _ACD.delete__Vec_double_2 + +# Register _Vec_double_2 in _ACD: +_ACD._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _ACD._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_double_2_generic_type + channels = _ACD._DataType_Vec_double_2_channels + fmt = _ACD._DataType_Vec_double_2_fmt + + def __init__(self): + _ACD._DataType_Vec_double_2_swiginit(self, _ACD.new__DataType_Vec_double_2()) + __swig_destroy__ = _ACD.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _ACD: +_ACD._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_3_1_rows + cols = _ACD._Matx_double_3_1_cols + channels = _ACD._Matx_double_3_1_channels + shortdim = _ACD._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_3_1_ddot(self, v) + + def t(self): + return _ACD._Matx_double_3_1_t(self) + + def mul(self, a): + return _ACD._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_3_1___call__(self, i, j) + val = property(_ACD._Matx_double_3_1_val_get, _ACD._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_3_1_swiginit(self, _ACD.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_3_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _ACD: +_ACD._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _ACD._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _ACD._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _ACD._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _ACD._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _ACD._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _ACD._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_double_3_all(alpha) + + def mul(self, v): + return _ACD._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_double_3_swiginit(self, _ACD.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_double_3___str__(self) + __swig_destroy__ = _ACD.delete__Vec_double_3 + +# Register _Vec_double_3 in _ACD: +_ACD._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _ACD._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_double_3_generic_type + channels = _ACD._DataType_Vec_double_3_channels + fmt = _ACD._DataType_Vec_double_3_fmt + + def __init__(self): + _ACD._DataType_Vec_double_3_swiginit(self, _ACD.new__DataType_Vec_double_3()) + __swig_destroy__ = _ACD.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _ACD: +_ACD._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_4_1_rows + cols = _ACD._Matx_double_4_1_cols + channels = _ACD._Matx_double_4_1_channels + shortdim = _ACD._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_4_1_ddot(self, v) + + def t(self): + return _ACD._Matx_double_4_1_t(self) + + def mul(self, a): + return _ACD._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_4_1___call__(self, i, j) + val = property(_ACD._Matx_double_4_1_val_get, _ACD._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_4_1_swiginit(self, _ACD.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_4_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _ACD: +_ACD._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _ACD._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _ACD._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _ACD._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _ACD._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _ACD._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _ACD._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_double_4_all(alpha) + + def mul(self, v): + return _ACD._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_double_4_swiginit(self, _ACD.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_double_4___str__(self) + __swig_destroy__ = _ACD.delete__Vec_double_4 + +# Register _Vec_double_4 in _ACD: +_ACD._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _ACD._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_double_4_generic_type + channels = _ACD._DataType_Vec_double_4_channels + fmt = _ACD._DataType_Vec_double_4_fmt + + def __init__(self): + _ACD._DataType_Vec_double_4_swiginit(self, _ACD.new__DataType_Vec_double_4()) + __swig_destroy__ = _ACD.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _ACD: +_ACD._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_6_1_rows + cols = _ACD._Matx_double_6_1_cols + channels = _ACD._Matx_double_6_1_channels + shortdim = _ACD._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_6_1_ddot(self, v) + + def t(self): + return _ACD._Matx_double_6_1_t(self) + + def mul(self, a): + return _ACD._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_6_1___call__(self, i, j) + val = property(_ACD._Matx_double_6_1_val_get, _ACD._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_6_1_swiginit(self, _ACD.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_6_1___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _ACD: +_ACD._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _ACD._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _ACD._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _ACD._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _ACD._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _ACD._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _ACD._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _ACD._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _ACD._Vec_double_6_all(alpha) + + def mul(self, v): + return _ACD._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _ACD._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Vec_double_6_swiginit(self, _ACD.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Vec_double_6___str__(self) + __swig_destroy__ = _ACD.delete__Vec_double_6 + +# Register _Vec_double_6 in _ACD: +_ACD._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _ACD._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _ACD._DataType_Vec_double_6_generic_type + channels = _ACD._DataType_Vec_double_6_channels + fmt = _ACD._DataType_Vec_double_6_fmt + + def __init__(self): + _ACD._DataType_Vec_double_6_swiginit(self, _ACD.new__DataType_Vec_double_6()) + __swig_destroy__ = _ACD.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _ACD: +_ACD._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _ACD._mat__np_array_constructor_swiginit(self, _ACD.new__mat__np_array_constructor()) + __swig_destroy__ = _ACD.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _ACD: +_ACD._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _ACD._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _ACD._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_uchar_value + + def __init__(self): + _ACD._cv_numpy_sizeof_uchar_swiginit(self, _ACD.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _ACD: +_ACD._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__uchar_create(self, *args) + + def cross(self, m): + return _ACD._Mat__uchar_cross(self, m) + + def row(self, y): + return _ACD._Mat__uchar_row(self, y) + + def col(self, x): + return _ACD._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__uchar_diag(self, d) + + def clone(self): + return _ACD._Mat__uchar_clone(self) + + def elemSize(self): + return _ACD._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__uchar_elemSize1(self) + + def type(self): + return _ACD._Mat__uchar_type(self) + + def depth(self): + return _ACD._Mat__uchar_depth(self) + + def channels(self): + return _ACD._Mat__uchar_channels(self) + + def step1(self, i=0): + return _ACD._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__uchar_swiginit(self, _ACD.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__uchar___str__(self) + __swig_destroy__ = _ACD.delete__Mat__uchar + +# Register _Mat__uchar in _ACD: +_ACD._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2b_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _ACD: +_ACD._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2b_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2b_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2b_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2b_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2b_type(self) + + def depth(self): + return _ACD._Mat__Vec2b_depth(self) + + def channels(self): + return _ACD._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2b_swiginit(self, _ACD.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2b___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _ACD: +_ACD._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3b_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _ACD: +_ACD._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3b_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3b_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3b_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3b_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3b_type(self) + + def depth(self): + return _ACD._Mat__Vec3b_depth(self) + + def channels(self): + return _ACD._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3b_swiginit(self, _ACD.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3b___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _ACD: +_ACD._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4b_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _ACD: +_ACD._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4b_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4b_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4b_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4b_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4b_type(self) + + def depth(self): + return _ACD._Mat__Vec4b_depth(self) + + def channels(self): + return _ACD._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4b_swiginit(self, _ACD.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4b___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _ACD: +_ACD._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__short_create(self, *args) + + def cross(self, m): + return _ACD._Mat__short_cross(self, m) + + def row(self, y): + return _ACD._Mat__short_row(self, y) + + def col(self, x): + return _ACD._Mat__short_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__short_diag(self, d) + + def clone(self): + return _ACD._Mat__short_clone(self) + + def elemSize(self): + return _ACD._Mat__short_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__short_elemSize1(self) + + def type(self): + return _ACD._Mat__short_type(self) + + def depth(self): + return _ACD._Mat__short_depth(self) + + def channels(self): + return _ACD._Mat__short_channels(self) + + def step1(self, i=0): + return _ACD._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__short___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__short_swiginit(self, _ACD.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__short___str__(self) + __swig_destroy__ = _ACD.delete__Mat__short + +# Register _Mat__short in _ACD: +_ACD._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2s_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _ACD: +_ACD._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2s_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2s_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2s_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2s_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2s_type(self) + + def depth(self): + return _ACD._Mat__Vec2s_depth(self) + + def channels(self): + return _ACD._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2s_swiginit(self, _ACD.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2s___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _ACD: +_ACD._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3s_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _ACD: +_ACD._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3s_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3s_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3s_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3s_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3s_type(self) + + def depth(self): + return _ACD._Mat__Vec3s_depth(self) + + def channels(self): + return _ACD._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3s_swiginit(self, _ACD.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3s___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _ACD: +_ACD._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4s_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _ACD: +_ACD._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4s_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4s_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4s_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4s_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4s_type(self) + + def depth(self): + return _ACD._Mat__Vec4s_depth(self) + + def channels(self): + return _ACD._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4s_swiginit(self, _ACD.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4s___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _ACD: +_ACD._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__ushort_create(self, *args) + + def cross(self, m): + return _ACD._Mat__ushort_cross(self, m) + + def row(self, y): + return _ACD._Mat__ushort_row(self, y) + + def col(self, x): + return _ACD._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__ushort_diag(self, d) + + def clone(self): + return _ACD._Mat__ushort_clone(self) + + def elemSize(self): + return _ACD._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__ushort_elemSize1(self) + + def type(self): + return _ACD._Mat__ushort_type(self) + + def depth(self): + return _ACD._Mat__ushort_depth(self) + + def channels(self): + return _ACD._Mat__ushort_channels(self) + + def step1(self, i=0): + return _ACD._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__ushort_swiginit(self, _ACD.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__ushort___str__(self) + __swig_destroy__ = _ACD.delete__Mat__ushort + +# Register _Mat__ushort in _ACD: +_ACD._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2w_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _ACD: +_ACD._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2w_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2w_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2w_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2w_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2w_type(self) + + def depth(self): + return _ACD._Mat__Vec2w_depth(self) + + def channels(self): + return _ACD._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2w_swiginit(self, _ACD.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2w___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _ACD: +_ACD._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3w_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _ACD: +_ACD._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3w_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3w_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3w_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3w_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3w_type(self) + + def depth(self): + return _ACD._Mat__Vec3w_depth(self) + + def channels(self): + return _ACD._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3w_swiginit(self, _ACD.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3w___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _ACD: +_ACD._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4w_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _ACD: +_ACD._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4w_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4w_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4w_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4w_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4w_type(self) + + def depth(self): + return _ACD._Mat__Vec4w_depth(self) + + def channels(self): + return _ACD._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4w_swiginit(self, _ACD.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4w___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _ACD: +_ACD._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__int_create(self, *args) + + def cross(self, m): + return _ACD._Mat__int_cross(self, m) + + def row(self, y): + return _ACD._Mat__int_row(self, y) + + def col(self, x): + return _ACD._Mat__int_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__int_diag(self, d) + + def clone(self): + return _ACD._Mat__int_clone(self) + + def elemSize(self): + return _ACD._Mat__int_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__int_elemSize1(self) + + def type(self): + return _ACD._Mat__int_type(self) + + def depth(self): + return _ACD._Mat__int_depth(self) + + def channels(self): + return _ACD._Mat__int_channels(self) + + def step1(self, i=0): + return _ACD._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__int___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__int_swiginit(self, _ACD.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__int___str__(self) + __swig_destroy__ = _ACD.delete__Mat__int + +# Register _Mat__int in _ACD: +_ACD._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2i_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _ACD: +_ACD._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2i_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2i_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2i_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2i_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2i_type(self) + + def depth(self): + return _ACD._Mat__Vec2i_depth(self) + + def channels(self): + return _ACD._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2i_swiginit(self, _ACD.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2i___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _ACD: +_ACD._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3i_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _ACD: +_ACD._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3i_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3i_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3i_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3i_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3i_type(self) + + def depth(self): + return _ACD._Mat__Vec3i_depth(self) + + def channels(self): + return _ACD._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3i_swiginit(self, _ACD.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3i___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _ACD: +_ACD._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4i_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _ACD: +_ACD._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4i_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4i_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4i_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4i_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4i_type(self) + + def depth(self): + return _ACD._Mat__Vec4i_depth(self) + + def channels(self): + return _ACD._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4i_swiginit(self, _ACD.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4i___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _ACD: +_ACD._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__float_create(self, *args) + + def cross(self, m): + return _ACD._Mat__float_cross(self, m) + + def row(self, y): + return _ACD._Mat__float_row(self, y) + + def col(self, x): + return _ACD._Mat__float_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__float_diag(self, d) + + def clone(self): + return _ACD._Mat__float_clone(self) + + def elemSize(self): + return _ACD._Mat__float_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__float_elemSize1(self) + + def type(self): + return _ACD._Mat__float_type(self) + + def depth(self): + return _ACD._Mat__float_depth(self) + + def channels(self): + return _ACD._Mat__float_channels(self) + + def step1(self, i=0): + return _ACD._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__float___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__float_swiginit(self, _ACD.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__float___str__(self) + __swig_destroy__ = _ACD.delete__Mat__float + +# Register _Mat__float in _ACD: +_ACD._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2f_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _ACD: +_ACD._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2f_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2f_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2f_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2f_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2f_type(self) + + def depth(self): + return _ACD._Mat__Vec2f_depth(self) + + def channels(self): + return _ACD._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2f_swiginit(self, _ACD.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2f___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _ACD: +_ACD._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3f_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _ACD: +_ACD._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3f_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3f_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3f_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3f_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3f_type(self) + + def depth(self): + return _ACD._Mat__Vec3f_depth(self) + + def channels(self): + return _ACD._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3f_swiginit(self, _ACD.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3f___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _ACD: +_ACD._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4f_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _ACD: +_ACD._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4f_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4f_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4f_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4f_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4f_type(self) + + def depth(self): + return _ACD._Mat__Vec4f_depth(self) + + def channels(self): + return _ACD._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4f_swiginit(self, _ACD.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4f___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _ACD: +_ACD._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__double_create(self, *args) + + def cross(self, m): + return _ACD._Mat__double_cross(self, m) + + def row(self, y): + return _ACD._Mat__double_row(self, y) + + def col(self, x): + return _ACD._Mat__double_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__double_diag(self, d) + + def clone(self): + return _ACD._Mat__double_clone(self) + + def elemSize(self): + return _ACD._Mat__double_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__double_elemSize1(self) + + def type(self): + return _ACD._Mat__double_type(self) + + def depth(self): + return _ACD._Mat__double_depth(self) + + def channels(self): + return _ACD._Mat__double_channels(self) + + def step1(self, i=0): + return _ACD._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__double___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__double_swiginit(self, _ACD.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__double___str__(self) + __swig_destroy__ = _ACD.delete__Mat__double + +# Register _Mat__double in _ACD: +_ACD._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec2d_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _ACD: +_ACD._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec2d_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec2d_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec2d_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec2d_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec2d_type(self) + + def depth(self): + return _ACD._Mat__Vec2d_depth(self) + + def channels(self): + return _ACD._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec2d_swiginit(self, _ACD.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec2d___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _ACD: +_ACD._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec3d_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _ACD: +_ACD._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec3d_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec3d_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec3d_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec3d_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec3d_type(self) + + def depth(self): + return _ACD._Mat__Vec3d_depth(self) + + def channels(self): + return _ACD._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec3d_swiginit(self, _ACD.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec3d___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _ACD: +_ACD._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _ACD._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _ACD._cv_numpy_sizeof_Vec4d_swiginit(self, _ACD.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _ACD.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _ACD: +_ACD._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _ACD._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _ACD._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _ACD._Mat__Vec4d_row(self, y) + + def col(self, x): + return _ACD._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _ACD._Mat__Vec4d_diag(self, d) + + def clone(self): + return _ACD._Mat__Vec4d_clone(self) + + def elemSize(self): + return _ACD._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _ACD._Mat__Vec4d_elemSize1(self) + + def type(self): + return _ACD._Mat__Vec4d_type(self) + + def depth(self): + return _ACD._Mat__Vec4d_depth(self) + + def channels(self): + return _ACD._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _ACD._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _ACD._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _ACD._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _ACD._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _ACD._Mat__Vec4d_swiginit(self, _ACD.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _ACD._Mat__Vec4d___str__(self) + __swig_destroy__ = _ACD.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _ACD: +_ACD._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_1_2_rows + cols = _ACD._Matx_float_1_2_cols + channels = _ACD._Matx_float_1_2_channels + shortdim = _ACD._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_1_2_ddot(self, v) + + def t(self): + return _ACD._Matx_float_1_2_t(self) + + def mul(self, a): + return _ACD._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_1_2___call__(self, i, j) + val = property(_ACD._Matx_float_1_2_val_get, _ACD._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_1_2_swiginit(self, _ACD.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_1_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _ACD: +_ACD._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _ACD._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _ACD._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _ACD._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _ACD._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _ACD._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _ACD._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_1_2_rows + cols = _ACD._Matx_double_1_2_cols + channels = _ACD._Matx_double_1_2_channels + shortdim = _ACD._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_1_2_ddot(self, v) + + def t(self): + return _ACD._Matx_double_1_2_t(self) + + def mul(self, a): + return _ACD._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_1_2___call__(self, i, j) + val = property(_ACD._Matx_double_1_2_val_get, _ACD._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_1_2_swiginit(self, _ACD.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_1_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _ACD: +_ACD._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _ACD._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _ACD._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _ACD._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _ACD._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _ACD._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _ACD._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_1_3_rows + cols = _ACD._Matx_float_1_3_cols + channels = _ACD._Matx_float_1_3_channels + shortdim = _ACD._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_1_3_ddot(self, v) + + def t(self): + return _ACD._Matx_float_1_3_t(self) + + def mul(self, a): + return _ACD._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_1_3___call__(self, i, j) + val = property(_ACD._Matx_float_1_3_val_get, _ACD._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_1_3_swiginit(self, _ACD.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_1_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _ACD: +_ACD._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _ACD._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _ACD._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _ACD._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _ACD._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _ACD._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _ACD._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_1_3_rows + cols = _ACD._Matx_double_1_3_cols + channels = _ACD._Matx_double_1_3_channels + shortdim = _ACD._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_1_3_ddot(self, v) + + def t(self): + return _ACD._Matx_double_1_3_t(self) + + def mul(self, a): + return _ACD._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_1_3___call__(self, i, j) + val = property(_ACD._Matx_double_1_3_val_get, _ACD._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_1_3_swiginit(self, _ACD.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_1_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _ACD: +_ACD._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _ACD._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _ACD._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _ACD._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _ACD._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _ACD._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _ACD._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_1_4_rows + cols = _ACD._Matx_float_1_4_cols + channels = _ACD._Matx_float_1_4_channels + shortdim = _ACD._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_1_4_ddot(self, v) + + def t(self): + return _ACD._Matx_float_1_4_t(self) + + def mul(self, a): + return _ACD._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_1_4___call__(self, i, j) + val = property(_ACD._Matx_float_1_4_val_get, _ACD._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_1_4_swiginit(self, _ACD.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_1_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _ACD: +_ACD._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _ACD._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _ACD._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _ACD._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _ACD._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _ACD._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _ACD._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_1_4_rows + cols = _ACD._Matx_double_1_4_cols + channels = _ACD._Matx_double_1_4_channels + shortdim = _ACD._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_1_4_ddot(self, v) + + def t(self): + return _ACD._Matx_double_1_4_t(self) + + def mul(self, a): + return _ACD._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_1_4___call__(self, i, j) + val = property(_ACD._Matx_double_1_4_val_get, _ACD._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_1_4_swiginit(self, _ACD.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_1_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _ACD: +_ACD._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _ACD._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _ACD._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _ACD._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _ACD._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _ACD._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _ACD._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_1_6_rows + cols = _ACD._Matx_float_1_6_cols + channels = _ACD._Matx_float_1_6_channels + shortdim = _ACD._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_1_6_ddot(self, v) + + def t(self): + return _ACD._Matx_float_1_6_t(self) + + def mul(self, a): + return _ACD._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_1_6___call__(self, i, j) + val = property(_ACD._Matx_float_1_6_val_get, _ACD._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_1_6_swiginit(self, _ACD.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_1_6___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _ACD: +_ACD._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _ACD._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _ACD._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _ACD._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _ACD._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _ACD._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _ACD._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_1_6_rows + cols = _ACD._Matx_double_1_6_cols + channels = _ACD._Matx_double_1_6_channels + shortdim = _ACD._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_1_6_ddot(self, v) + + def t(self): + return _ACD._Matx_double_1_6_t(self) + + def mul(self, a): + return _ACD._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_1_6___call__(self, i, j) + val = property(_ACD._Matx_double_1_6_val_get, _ACD._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_1_6_swiginit(self, _ACD.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_1_6___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _ACD: +_ACD._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _ACD._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _ACD._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _ACD._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _ACD._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _ACD._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _ACD._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_2_2_rows + cols = _ACD._Matx_float_2_2_cols + channels = _ACD._Matx_float_2_2_channels + shortdim = _ACD._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_2_2_ddot(self, v) + + def t(self): + return _ACD._Matx_float_2_2_t(self) + + def mul(self, a): + return _ACD._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_2_2___call__(self, i, j) + val = property(_ACD._Matx_float_2_2_val_get, _ACD._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_2_2_swiginit(self, _ACD.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_2_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _ACD: +_ACD._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _ACD._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _ACD._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _ACD._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _ACD._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _ACD._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _ACD._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_2_2_rows + cols = _ACD._Matx_double_2_2_cols + channels = _ACD._Matx_double_2_2_channels + shortdim = _ACD._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_2_2_ddot(self, v) + + def t(self): + return _ACD._Matx_double_2_2_t(self) + + def mul(self, a): + return _ACD._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_2_2___call__(self, i, j) + val = property(_ACD._Matx_double_2_2_val_get, _ACD._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_2_2_swiginit(self, _ACD.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_2_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _ACD: +_ACD._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _ACD._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _ACD._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _ACD._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _ACD._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _ACD._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _ACD._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_2_3_rows + cols = _ACD._Matx_float_2_3_cols + channels = _ACD._Matx_float_2_3_channels + shortdim = _ACD._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_2_3_ddot(self, v) + + def t(self): + return _ACD._Matx_float_2_3_t(self) + + def mul(self, a): + return _ACD._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_2_3___call__(self, i, j) + val = property(_ACD._Matx_float_2_3_val_get, _ACD._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_2_3_swiginit(self, _ACD.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_2_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _ACD: +_ACD._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _ACD._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _ACD._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _ACD._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _ACD._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _ACD._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _ACD._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_2_3_rows + cols = _ACD._Matx_double_2_3_cols + channels = _ACD._Matx_double_2_3_channels + shortdim = _ACD._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_2_3_ddot(self, v) + + def t(self): + return _ACD._Matx_double_2_3_t(self) + + def mul(self, a): + return _ACD._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_2_3___call__(self, i, j) + val = property(_ACD._Matx_double_2_3_val_get, _ACD._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_2_3_swiginit(self, _ACD.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_2_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _ACD: +_ACD._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _ACD._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _ACD._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _ACD._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _ACD._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _ACD._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _ACD._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_3_2_rows + cols = _ACD._Matx_float_3_2_cols + channels = _ACD._Matx_float_3_2_channels + shortdim = _ACD._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_3_2_ddot(self, v) + + def t(self): + return _ACD._Matx_float_3_2_t(self) + + def mul(self, a): + return _ACD._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_3_2___call__(self, i, j) + val = property(_ACD._Matx_float_3_2_val_get, _ACD._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_3_2_swiginit(self, _ACD.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_3_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _ACD: +_ACD._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _ACD._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _ACD._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _ACD._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _ACD._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _ACD._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _ACD._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_3_2_rows + cols = _ACD._Matx_double_3_2_cols + channels = _ACD._Matx_double_3_2_channels + shortdim = _ACD._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_3_2_ddot(self, v) + + def t(self): + return _ACD._Matx_double_3_2_t(self) + + def mul(self, a): + return _ACD._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_3_2___call__(self, i, j) + val = property(_ACD._Matx_double_3_2_val_get, _ACD._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_3_2_swiginit(self, _ACD.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_3_2___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _ACD: +_ACD._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _ACD._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _ACD._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _ACD._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _ACD._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _ACD._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _ACD._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_3_3_rows + cols = _ACD._Matx_float_3_3_cols + channels = _ACD._Matx_float_3_3_channels + shortdim = _ACD._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_3_3_ddot(self, v) + + def t(self): + return _ACD._Matx_float_3_3_t(self) + + def mul(self, a): + return _ACD._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_3_3___call__(self, i, j) + val = property(_ACD._Matx_float_3_3_val_get, _ACD._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_3_3_swiginit(self, _ACD.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_3_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _ACD: +_ACD._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _ACD._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _ACD._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _ACD._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _ACD._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _ACD._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _ACD._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_3_3_rows + cols = _ACD._Matx_double_3_3_cols + channels = _ACD._Matx_double_3_3_channels + shortdim = _ACD._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_3_3_ddot(self, v) + + def t(self): + return _ACD._Matx_double_3_3_t(self) + + def mul(self, a): + return _ACD._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_3_3___call__(self, i, j) + val = property(_ACD._Matx_double_3_3_val_get, _ACD._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_3_3_swiginit(self, _ACD.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_3_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _ACD: +_ACD._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _ACD._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _ACD._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _ACD._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _ACD._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _ACD._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _ACD._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_3_4_rows + cols = _ACD._Matx_float_3_4_cols + channels = _ACD._Matx_float_3_4_channels + shortdim = _ACD._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_3_4_ddot(self, v) + + def t(self): + return _ACD._Matx_float_3_4_t(self) + + def mul(self, a): + return _ACD._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_3_4___call__(self, i, j) + val = property(_ACD._Matx_float_3_4_val_get, _ACD._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_3_4_swiginit(self, _ACD.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_3_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _ACD: +_ACD._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _ACD._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _ACD._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _ACD._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _ACD._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _ACD._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _ACD._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_3_4_rows + cols = _ACD._Matx_double_3_4_cols + channels = _ACD._Matx_double_3_4_channels + shortdim = _ACD._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_3_4_ddot(self, v) + + def t(self): + return _ACD._Matx_double_3_4_t(self) + + def mul(self, a): + return _ACD._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_3_4___call__(self, i, j) + val = property(_ACD._Matx_double_3_4_val_get, _ACD._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_3_4_swiginit(self, _ACD.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_3_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _ACD: +_ACD._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _ACD._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _ACD._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _ACD._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _ACD._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _ACD._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _ACD._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_4_3_rows + cols = _ACD._Matx_float_4_3_cols + channels = _ACD._Matx_float_4_3_channels + shortdim = _ACD._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_4_3_ddot(self, v) + + def t(self): + return _ACD._Matx_float_4_3_t(self) + + def mul(self, a): + return _ACD._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_4_3___call__(self, i, j) + val = property(_ACD._Matx_float_4_3_val_get, _ACD._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_4_3_swiginit(self, _ACD.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_4_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _ACD: +_ACD._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _ACD._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _ACD._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _ACD._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _ACD._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _ACD._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _ACD._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_4_3_rows + cols = _ACD._Matx_double_4_3_cols + channels = _ACD._Matx_double_4_3_channels + shortdim = _ACD._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_4_3_ddot(self, v) + + def t(self): + return _ACD._Matx_double_4_3_t(self) + + def mul(self, a): + return _ACD._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_4_3___call__(self, i, j) + val = property(_ACD._Matx_double_4_3_val_get, _ACD._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_4_3_swiginit(self, _ACD.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_4_3___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _ACD: +_ACD._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _ACD._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _ACD._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _ACD._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _ACD._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _ACD._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _ACD._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_4_4_rows + cols = _ACD._Matx_float_4_4_cols + channels = _ACD._Matx_float_4_4_channels + shortdim = _ACD._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_4_4_ddot(self, v) + + def t(self): + return _ACD._Matx_float_4_4_t(self) + + def mul(self, a): + return _ACD._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_4_4___call__(self, i, j) + val = property(_ACD._Matx_float_4_4_val_get, _ACD._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_4_4_swiginit(self, _ACD.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_4_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _ACD: +_ACD._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _ACD._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _ACD._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _ACD._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _ACD._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _ACD._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _ACD._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_4_4_rows + cols = _ACD._Matx_double_4_4_cols + channels = _ACD._Matx_double_4_4_channels + shortdim = _ACD._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_4_4_ddot(self, v) + + def t(self): + return _ACD._Matx_double_4_4_t(self) + + def mul(self, a): + return _ACD._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_4_4___call__(self, i, j) + val = property(_ACD._Matx_double_4_4_val_get, _ACD._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_4_4_swiginit(self, _ACD.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_4_4___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _ACD: +_ACD._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _ACD._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _ACD._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _ACD._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _ACD._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _ACD._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _ACD._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_float_6_6_rows + cols = _ACD._Matx_float_6_6_cols + channels = _ACD._Matx_float_6_6_channels + shortdim = _ACD._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _ACD._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _ACD._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_float_6_6_ddot(self, v) + + def t(self): + return _ACD._Matx_float_6_6_t(self) + + def mul(self, a): + return _ACD._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _ACD._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_float_6_6___call__(self, i, j) + val = property(_ACD._Matx_float_6_6_val_get, _ACD._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_float_6_6_swiginit(self, _ACD.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_float_6_6___str__(self) + __swig_destroy__ = _ACD.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _ACD: +_ACD._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _ACD._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _ACD._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _ACD._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _ACD._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _ACD._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _ACD._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _ACD._Matx_double_6_6_rows + cols = _ACD._Matx_double_6_6_cols + channels = _ACD._Matx_double_6_6_channels + shortdim = _ACD._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _ACD._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _ACD._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _ACD._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _ACD._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _ACD._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _ACD._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _ACD._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _ACD._Matx_double_6_6_ddot(self, v) + + def t(self): + return _ACD._Matx_double_6_6_t(self) + + def mul(self, a): + return _ACD._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _ACD._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _ACD._Matx_double_6_6___call__(self, i, j) + val = property(_ACD._Matx_double_6_6_val_get, _ACD._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _ACD._Matx_double_6_6_swiginit(self, _ACD.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _ACD._Matx_double_6_6___str__(self) + __swig_destroy__ = _ACD.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _ACD: +_ACD._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _ACD._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _ACD._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _ACD._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _ACD._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _ACD._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _ACD._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Point__int_swiginit(self, _ACD.new__Point__int(*args)) + + def dot(self, pt): + return _ACD._Point__int_dot(self, pt) + + def ddot(self, pt): + return _ACD._Point__int_ddot(self, pt) + + def cross(self, pt): + return _ACD._Point__int_cross(self, pt) + x = property(_ACD._Point__int_x_get, _ACD._Point__int_x_set) + y = property(_ACD._Point__int_y_get, _ACD._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _ACD._Point__int___str__(self) + __swig_destroy__ = _ACD.delete__Point__int + +# Register _Point__int in _ACD: +_ACD._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Point__float_swiginit(self, _ACD.new__Point__float(*args)) + + def dot(self, pt): + return _ACD._Point__float_dot(self, pt) + + def ddot(self, pt): + return _ACD._Point__float_ddot(self, pt) + + def cross(self, pt): + return _ACD._Point__float_cross(self, pt) + x = property(_ACD._Point__float_x_get, _ACD._Point__float_x_set) + y = property(_ACD._Point__float_y_get, _ACD._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _ACD._Point__float___str__(self) + __swig_destroy__ = _ACD.delete__Point__float + +# Register _Point__float in _ACD: +_ACD._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Point__double_swiginit(self, _ACD.new__Point__double(*args)) + + def dot(self, pt): + return _ACD._Point__double_dot(self, pt) + + def ddot(self, pt): + return _ACD._Point__double_ddot(self, pt) + + def cross(self, pt): + return _ACD._Point__double_cross(self, pt) + x = property(_ACD._Point__double_x_get, _ACD._Point__double_x_set) + y = property(_ACD._Point__double_y_get, _ACD._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _ACD._Point__double___str__(self) + __swig_destroy__ = _ACD.delete__Point__double + +# Register _Point__double in _ACD: +_ACD._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Rect__int_swiginit(self, _ACD.new__Rect__int(*args)) + + def tl(self): + return _ACD._Rect__int_tl(self) + + def br(self): + return _ACD._Rect__int_br(self) + + def size(self): + return _ACD._Rect__int_size(self) + + def area(self): + return _ACD._Rect__int_area(self) + + def contains(self, pt): + return _ACD._Rect__int_contains(self, pt) + x = property(_ACD._Rect__int_x_get, _ACD._Rect__int_x_set) + y = property(_ACD._Rect__int_y_get, _ACD._Rect__int_y_set) + width = property(_ACD._Rect__int_width_get, _ACD._Rect__int_width_set) + height = property(_ACD._Rect__int_height_get, _ACD._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _ACD._Rect__int___str__(self) + __swig_destroy__ = _ACD.delete__Rect__int + +# Register _Rect__int in _ACD: +_ACD._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Rect__float_swiginit(self, _ACD.new__Rect__float(*args)) + + def tl(self): + return _ACD._Rect__float_tl(self) + + def br(self): + return _ACD._Rect__float_br(self) + + def size(self): + return _ACD._Rect__float_size(self) + + def area(self): + return _ACD._Rect__float_area(self) + + def contains(self, pt): + return _ACD._Rect__float_contains(self, pt) + x = property(_ACD._Rect__float_x_get, _ACD._Rect__float_x_set) + y = property(_ACD._Rect__float_y_get, _ACD._Rect__float_y_set) + width = property(_ACD._Rect__float_width_get, _ACD._Rect__float_width_set) + height = property(_ACD._Rect__float_height_get, _ACD._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _ACD._Rect__float___str__(self) + __swig_destroy__ = _ACD.delete__Rect__float + +# Register _Rect__float in _ACD: +_ACD._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Rect__double_swiginit(self, _ACD.new__Rect__double(*args)) + + def tl(self): + return _ACD._Rect__double_tl(self) + + def br(self): + return _ACD._Rect__double_br(self) + + def size(self): + return _ACD._Rect__double_size(self) + + def area(self): + return _ACD._Rect__double_area(self) + + def contains(self, pt): + return _ACD._Rect__double_contains(self, pt) + x = property(_ACD._Rect__double_x_get, _ACD._Rect__double_x_set) + y = property(_ACD._Rect__double_y_get, _ACD._Rect__double_y_set) + width = property(_ACD._Rect__double_width_get, _ACD._Rect__double_width_set) + height = property(_ACD._Rect__double_height_get, _ACD._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _ACD._Rect__double___str__(self) + __swig_destroy__ = _ACD.delete__Rect__double + +# Register _Rect__double in _ACD: +_ACD._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Scalar__double_swiginit(self, _ACD.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _ACD._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _ACD._Scalar__double_mul(self, a, scale) + + def conj(self): + return _ACD._Scalar__double_conj(self) + + def isReal(self): + return _ACD._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _ACD._Scalar__double___str__(self) + __swig_destroy__ = _ACD.delete__Scalar__double + +# Register _Scalar__double in _ACD: +_ACD._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _ACD._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Size__int_swiginit(self, _ACD.new__Size__int(*args)) + + def area(self): + return _ACD._Size__int_area(self) + width = property(_ACD._Size__int_width_get, _ACD._Size__int_width_set) + height = property(_ACD._Size__int_height_get, _ACD._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _ACD._Size__int___str__(self) + __swig_destroy__ = _ACD.delete__Size__int + +# Register _Size__int in _ACD: +_ACD._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Size__float_swiginit(self, _ACD.new__Size__float(*args)) + + def area(self): + return _ACD._Size__float_area(self) + width = property(_ACD._Size__float_width_get, _ACD._Size__float_width_set) + height = property(_ACD._Size__float_height_get, _ACD._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _ACD._Size__float___str__(self) + __swig_destroy__ = _ACD.delete__Size__float + +# Register _Size__float in _ACD: +_ACD._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _ACD._Size__double_swiginit(self, _ACD.new__Size__double(*args)) + + def area(self): + return _ACD._Size__double_area(self) + width = property(_ACD._Size__double_width_get, _ACD._Size__double_width_set) + height = property(_ACD._Size__double_height_get, _ACD._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _ACD._Size__double___str__(self) + __swig_destroy__ = _ACD.delete__Size__double + +# Register _Size__double in _ACD: +_ACD._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def ACD(file1, file2, outfile): + return _ACD.ACD(file1, file2, outfile) + + diff --git a/plugins/veg_method/scripts/AHT.py b/plugins/veg_method/scripts/AHT.py new file mode 100644 index 0000000..388a8a5 --- /dev/null +++ b/plugins/veg_method/scripts/AHT.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _AHT +else: + import _AHT + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _AHT.CV_VERSION_MAJOR +CV_VERSION_MINOR = _AHT.CV_VERSION_MINOR +CV_VERSION_REVISION = _AHT.CV_VERSION_REVISION +CV_VERSION_STATUS = _AHT.CV_VERSION_STATUS +CV_VERSION = _AHT.CV_VERSION +CV_MAJOR_VERSION = _AHT.CV_MAJOR_VERSION +CV_MINOR_VERSION = _AHT.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _AHT.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_bool_generic_type + channels = _AHT.DataType_bool_channels + fmt = _AHT.DataType_bool_fmt + + def __init__(self): + _AHT.DataType_bool_swiginit(self, _AHT.new_DataType_bool()) + __swig_destroy__ = _AHT.delete_DataType_bool + +# Register DataType_bool in _AHT: +_AHT.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_uchar_generic_type + channels = _AHT.DataType_uchar_channels + fmt = _AHT.DataType_uchar_fmt + + def __init__(self): + _AHT.DataType_uchar_swiginit(self, _AHT.new_DataType_uchar()) + __swig_destroy__ = _AHT.delete_DataType_uchar + +# Register DataType_uchar in _AHT: +_AHT.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_schar_generic_type + channels = _AHT.DataType_schar_channels + fmt = _AHT.DataType_schar_fmt + + def __init__(self): + _AHT.DataType_schar_swiginit(self, _AHT.new_DataType_schar()) + __swig_destroy__ = _AHT.delete_DataType_schar + +# Register DataType_schar in _AHT: +_AHT.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_char_generic_type + channels = _AHT.DataType_char_channels + fmt = _AHT.DataType_char_fmt + + def __init__(self): + _AHT.DataType_char_swiginit(self, _AHT.new_DataType_char()) + __swig_destroy__ = _AHT.delete_DataType_char + +# Register DataType_char in _AHT: +_AHT.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_ushort_generic_type + channels = _AHT.DataType_ushort_channels + fmt = _AHT.DataType_ushort_fmt + + def __init__(self): + _AHT.DataType_ushort_swiginit(self, _AHT.new_DataType_ushort()) + __swig_destroy__ = _AHT.delete_DataType_ushort + +# Register DataType_ushort in _AHT: +_AHT.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_short_generic_type + channels = _AHT.DataType_short_channels + fmt = _AHT.DataType_short_fmt + + def __init__(self): + _AHT.DataType_short_swiginit(self, _AHT.new_DataType_short()) + __swig_destroy__ = _AHT.delete_DataType_short + +# Register DataType_short in _AHT: +_AHT.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_int_generic_type + channels = _AHT.DataType_int_channels + fmt = _AHT.DataType_int_fmt + + def __init__(self): + _AHT.DataType_int_swiginit(self, _AHT.new_DataType_int()) + __swig_destroy__ = _AHT.delete_DataType_int + +# Register DataType_int in _AHT: +_AHT.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_float_generic_type + channels = _AHT.DataType_float_channels + fmt = _AHT.DataType_float_fmt + + def __init__(self): + _AHT.DataType_float_swiginit(self, _AHT.new_DataType_float()) + __swig_destroy__ = _AHT.delete_DataType_float + +# Register DataType_float in _AHT: +_AHT.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT.DataType_double_generic_type + channels = _AHT.DataType_double_channels + fmt = _AHT.DataType_double_fmt + + def __init__(self): + _AHT.DataType_double_swiginit(self, _AHT.new_DataType_double()) + __swig_destroy__ = _AHT.delete_DataType_double + +# Register DataType_double in _AHT: +_AHT.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT.Range_swiginit(self, _AHT.new_Range(*args)) + + def size(self): + return _AHT.Range_size(self) + + def empty(self): + return _AHT.Range_empty(self) + + @staticmethod + def all(): + return _AHT.Range_all() + start = property(_AHT.Range_start_get, _AHT.Range_start_set) + end = property(_AHT.Range_end_get, _AHT.Range_end_set) + __swig_destroy__ = _AHT.delete_Range + +# Register Range in _AHT: +_AHT.Range_swigregister(Range) + +def Range_all(): + return _AHT.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _AHT.delete_SwigPyIterator + + def value(self): + return _AHT.SwigPyIterator_value(self) + + def incr(self, n=1): + return _AHT.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _AHT.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _AHT.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _AHT.SwigPyIterator_equal(self, x) + + def copy(self): + return _AHT.SwigPyIterator_copy(self) + + def next(self): + return _AHT.SwigPyIterator_next(self) + + def __next__(self): + return _AHT.SwigPyIterator___next__(self) + + def previous(self): + return _AHT.SwigPyIterator_previous(self) + + def advance(self, n): + return _AHT.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _AHT.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _AHT.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _AHT.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _AHT.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _AHT.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _AHT.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _AHT: +_AHT.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_AddOp_swiginit(self, _AHT.new_Matx_AddOp()) + __swig_destroy__ = _AHT.delete_Matx_AddOp + +# Register Matx_AddOp in _AHT: +_AHT.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_SubOp_swiginit(self, _AHT.new_Matx_SubOp()) + __swig_destroy__ = _AHT.delete_Matx_SubOp + +# Register Matx_SubOp in _AHT: +_AHT.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_ScaleOp_swiginit(self, _AHT.new_Matx_ScaleOp()) + __swig_destroy__ = _AHT.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _AHT: +_AHT.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_MulOp_swiginit(self, _AHT.new_Matx_MulOp()) + __swig_destroy__ = _AHT.delete_Matx_MulOp + +# Register Matx_MulOp in _AHT: +_AHT.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_DivOp_swiginit(self, _AHT.new_Matx_DivOp()) + __swig_destroy__ = _AHT.delete_Matx_DivOp + +# Register Matx_DivOp in _AHT: +_AHT.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_MatMulOp_swiginit(self, _AHT.new_Matx_MatMulOp()) + __swig_destroy__ = _AHT.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _AHT: +_AHT.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT.Matx_TOp_swiginit(self, _AHT.new_Matx_TOp()) + __swig_destroy__ = _AHT.delete_Matx_TOp + +# Register Matx_TOp in _AHT: +_AHT.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _AHT.delete_Mat + + def row(self, y): + return _AHT.Mat_row(self, y) + + def col(self, x): + return _AHT.Mat_col(self, x) + + def rowRange(self, *args): + return _AHT.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _AHT.Mat_colRange(self, *args) + + def diag(self, d=0): + return _AHT.Mat_diag(self, d) + + def clone(self): + return _AHT.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _AHT.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _AHT.Mat_reshape(self, *args) + + def create(self, *args): + return _AHT.Mat_create(self, *args) + + def addref(self): + return _AHT.Mat_addref(self) + + def release(self): + return _AHT.Mat_release(self) + + def deallocate(self): + return _AHT.Mat_deallocate(self) + + def copySize(self, m): + return _AHT.Mat_copySize(self, m) + + def reserve(self, sz): + return _AHT.Mat_reserve(self, sz) + + def resize(self, *args): + return _AHT.Mat_resize(self, *args) + + def push_back_(self, elem): + return _AHT.Mat_push_back_(self, elem) + + def push_back(self, m): + return _AHT.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _AHT.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _AHT.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT.Mat___call__(self, *args) + + def isContinuous(self): + return _AHT.Mat_isContinuous(self) + + def isSubmatrix(self): + return _AHT.Mat_isSubmatrix(self) + + def elemSize(self): + return _AHT.Mat_elemSize(self) + + def elemSize1(self): + return _AHT.Mat_elemSize1(self) + + def type(self): + return _AHT.Mat_type(self) + + def depth(self): + return _AHT.Mat_depth(self) + + def channels(self): + return _AHT.Mat_channels(self) + + def step1(self, i=0): + return _AHT.Mat_step1(self, i) + + def empty(self): + return _AHT.Mat_empty(self) + + def total(self): + return _AHT.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _AHT.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _AHT.Mat_ptr(self, *args) + MAGIC_VAL = _AHT.Mat_MAGIC_VAL + AUTO_STEP = _AHT.Mat_AUTO_STEP + CONTINUOUS_FLAG = _AHT.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _AHT.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _AHT.Mat_MAGIC_MASK + TYPE_MASK = _AHT.Mat_TYPE_MASK + DEPTH_MASK = _AHT.Mat_DEPTH_MASK + flags = property(_AHT.Mat_flags_get, _AHT.Mat_flags_set) + dims = property(_AHT.Mat_dims_get, _AHT.Mat_dims_set) + rows = property(_AHT.Mat_rows_get, _AHT.Mat_rows_set) + cols = property(_AHT.Mat_cols_get, _AHT.Mat_cols_set) + data = property(_AHT.Mat_data_get, _AHT.Mat_data_set) + datastart = property(_AHT.Mat_datastart_get, _AHT.Mat_datastart_set) + dataend = property(_AHT.Mat_dataend_get, _AHT.Mat_dataend_set) + datalimit = property(_AHT.Mat_datalimit_get, _AHT.Mat_datalimit_set) + + def __init__(self, *args): + _AHT.Mat_swiginit(self, _AHT.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT.Mat___str__(self) + +# Register Mat in _AHT: +_AHT.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _AHT._cv_numpy_sizeof_uint8_t_swiginit(self, _AHT.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _AHT: +_AHT._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _AHT.uint8_tArray___bool__(self) + + def __len__(self): + return _AHT.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _AHT.uint8_tArray_pop(self) + + def append(self, x): + return _AHT.uint8_tArray_append(self, x) + + def empty(self): + return _AHT.uint8_tArray_empty(self) + + def size(self): + return _AHT.uint8_tArray_size(self) + + def swap(self, v): + return _AHT.uint8_tArray_swap(self, v) + + def begin(self): + return _AHT.uint8_tArray_begin(self) + + def end(self): + return _AHT.uint8_tArray_end(self) + + def rbegin(self): + return _AHT.uint8_tArray_rbegin(self) + + def rend(self): + return _AHT.uint8_tArray_rend(self) + + def clear(self): + return _AHT.uint8_tArray_clear(self) + + def get_allocator(self): + return _AHT.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _AHT.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _AHT.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _AHT.uint8_tArray_swiginit(self, _AHT.new_uint8_tArray(*args)) + + def push_back(self, x): + return _AHT.uint8_tArray_push_back(self, x) + + def front(self): + return _AHT.uint8_tArray_front(self) + + def back(self): + return _AHT.uint8_tArray_back(self) + + def assign(self, n, x): + return _AHT.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _AHT.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _AHT.uint8_tArray_reserve(self, n) + + def capacity(self): + return _AHT.uint8_tArray_capacity(self) + __swig_destroy__ = _AHT.delete_uint8_tArray + +# Register uint8_tArray in _AHT: +_AHT.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_uint8_t_2_1_rows + cols = _AHT._Matx_uint8_t_2_1_cols + channels = _AHT._Matx_uint8_t_2_1_channels + shortdim = _AHT._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_AHT._Matx_uint8_t_2_1_val_get, _AHT._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_uint8_t_2_1_swiginit(self, _AHT.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _AHT: +_AHT._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _AHT._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _AHT._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _AHT._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _AHT._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _AHT._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _AHT._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_uint8_t_2_swiginit(self, _AHT.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _AHT: +_AHT._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _AHT._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_uint8_t_2_generic_type + channels = _AHT._DataType_Vec_uint8_t_2_channels + fmt = _AHT._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _AHT._DataType_Vec_uint8_t_2_swiginit(self, _AHT.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _AHT: +_AHT._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_uint8_t_3_1_rows + cols = _AHT._Matx_uint8_t_3_1_cols + channels = _AHT._Matx_uint8_t_3_1_channels + shortdim = _AHT._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_AHT._Matx_uint8_t_3_1_val_get, _AHT._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_uint8_t_3_1_swiginit(self, _AHT.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _AHT: +_AHT._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _AHT._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _AHT._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _AHT._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _AHT._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _AHT._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _AHT._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_uint8_t_3_swiginit(self, _AHT.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _AHT: +_AHT._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _AHT._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_uint8_t_3_generic_type + channels = _AHT._DataType_Vec_uint8_t_3_channels + fmt = _AHT._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _AHT._DataType_Vec_uint8_t_3_swiginit(self, _AHT.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _AHT: +_AHT._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_uint8_t_4_1_rows + cols = _AHT._Matx_uint8_t_4_1_cols + channels = _AHT._Matx_uint8_t_4_1_channels + shortdim = _AHT._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_AHT._Matx_uint8_t_4_1_val_get, _AHT._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_uint8_t_4_1_swiginit(self, _AHT.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _AHT: +_AHT._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _AHT._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _AHT._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _AHT._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _AHT._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _AHT._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _AHT._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_uint8_t_4_swiginit(self, _AHT.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _AHT: +_AHT._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _AHT._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_uint8_t_4_generic_type + channels = _AHT._DataType_Vec_uint8_t_4_channels + fmt = _AHT._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _AHT._DataType_Vec_uint8_t_4_swiginit(self, _AHT.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _AHT: +_AHT._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_short_value + + def __init__(self): + _AHT._cv_numpy_sizeof_short_swiginit(self, _AHT.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _AHT: +_AHT._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.shortArray___nonzero__(self) + + def __bool__(self): + return _AHT.shortArray___bool__(self) + + def __len__(self): + return _AHT.shortArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.shortArray___setitem__(self, *args) + + def pop(self): + return _AHT.shortArray_pop(self) + + def append(self, x): + return _AHT.shortArray_append(self, x) + + def empty(self): + return _AHT.shortArray_empty(self) + + def size(self): + return _AHT.shortArray_size(self) + + def swap(self, v): + return _AHT.shortArray_swap(self, v) + + def begin(self): + return _AHT.shortArray_begin(self) + + def end(self): + return _AHT.shortArray_end(self) + + def rbegin(self): + return _AHT.shortArray_rbegin(self) + + def rend(self): + return _AHT.shortArray_rend(self) + + def clear(self): + return _AHT.shortArray_clear(self) + + def get_allocator(self): + return _AHT.shortArray_get_allocator(self) + + def pop_back(self): + return _AHT.shortArray_pop_back(self) + + def erase(self, *args): + return _AHT.shortArray_erase(self, *args) + + def __init__(self, *args): + _AHT.shortArray_swiginit(self, _AHT.new_shortArray(*args)) + + def push_back(self, x): + return _AHT.shortArray_push_back(self, x) + + def front(self): + return _AHT.shortArray_front(self) + + def back(self): + return _AHT.shortArray_back(self) + + def assign(self, n, x): + return _AHT.shortArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.shortArray_resize(self, *args) + + def insert(self, *args): + return _AHT.shortArray_insert(self, *args) + + def reserve(self, n): + return _AHT.shortArray_reserve(self, n) + + def capacity(self): + return _AHT.shortArray_capacity(self) + __swig_destroy__ = _AHT.delete_shortArray + +# Register shortArray in _AHT: +_AHT.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_short_2_1_rows + cols = _AHT._Matx_short_2_1_cols + channels = _AHT._Matx_short_2_1_channels + shortdim = _AHT._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_short_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_short_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_short_2_1___call__(self, i, j) + val = property(_AHT._Matx_short_2_1_val_get, _AHT._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_short_2_1_swiginit(self, _AHT.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_short_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _AHT: +_AHT._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _AHT._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _AHT._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _AHT._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _AHT._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _AHT._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _AHT._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_short_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_short_2_swiginit(self, _AHT.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_short_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_short_2 + +# Register _Vec_short_2 in _AHT: +_AHT._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _AHT._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_short_2_generic_type + channels = _AHT._DataType_Vec_short_2_channels + fmt = _AHT._DataType_Vec_short_2_fmt + + def __init__(self): + _AHT._DataType_Vec_short_2_swiginit(self, _AHT.new__DataType_Vec_short_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _AHT: +_AHT._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_short_3_1_rows + cols = _AHT._Matx_short_3_1_cols + channels = _AHT._Matx_short_3_1_channels + shortdim = _AHT._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_short_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_short_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_short_3_1___call__(self, i, j) + val = property(_AHT._Matx_short_3_1_val_get, _AHT._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_short_3_1_swiginit(self, _AHT.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_short_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _AHT: +_AHT._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _AHT._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _AHT._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _AHT._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _AHT._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _AHT._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _AHT._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_short_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_short_3_swiginit(self, _AHT.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_short_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_short_3 + +# Register _Vec_short_3 in _AHT: +_AHT._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _AHT._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_short_3_generic_type + channels = _AHT._DataType_Vec_short_3_channels + fmt = _AHT._DataType_Vec_short_3_fmt + + def __init__(self): + _AHT._DataType_Vec_short_3_swiginit(self, _AHT.new__DataType_Vec_short_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _AHT: +_AHT._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_short_4_1_rows + cols = _AHT._Matx_short_4_1_cols + channels = _AHT._Matx_short_4_1_channels + shortdim = _AHT._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_short_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_short_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_short_4_1___call__(self, i, j) + val = property(_AHT._Matx_short_4_1_val_get, _AHT._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_short_4_1_swiginit(self, _AHT.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_short_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _AHT: +_AHT._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _AHT._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _AHT._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _AHT._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _AHT._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _AHT._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _AHT._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_short_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_short_4_swiginit(self, _AHT.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_short_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_short_4 + +# Register _Vec_short_4 in _AHT: +_AHT._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _AHT._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_short_4_generic_type + channels = _AHT._DataType_Vec_short_4_channels + fmt = _AHT._DataType_Vec_short_4_fmt + + def __init__(self): + _AHT._DataType_Vec_short_4_swiginit(self, _AHT.new__DataType_Vec_short_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _AHT: +_AHT._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_ushort_value + + def __init__(self): + _AHT._cv_numpy_sizeof_ushort_swiginit(self, _AHT.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _AHT: +_AHT._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.ushortArray___nonzero__(self) + + def __bool__(self): + return _AHT.ushortArray___bool__(self) + + def __len__(self): + return _AHT.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.ushortArray___setitem__(self, *args) + + def pop(self): + return _AHT.ushortArray_pop(self) + + def append(self, x): + return _AHT.ushortArray_append(self, x) + + def empty(self): + return _AHT.ushortArray_empty(self) + + def size(self): + return _AHT.ushortArray_size(self) + + def swap(self, v): + return _AHT.ushortArray_swap(self, v) + + def begin(self): + return _AHT.ushortArray_begin(self) + + def end(self): + return _AHT.ushortArray_end(self) + + def rbegin(self): + return _AHT.ushortArray_rbegin(self) + + def rend(self): + return _AHT.ushortArray_rend(self) + + def clear(self): + return _AHT.ushortArray_clear(self) + + def get_allocator(self): + return _AHT.ushortArray_get_allocator(self) + + def pop_back(self): + return _AHT.ushortArray_pop_back(self) + + def erase(self, *args): + return _AHT.ushortArray_erase(self, *args) + + def __init__(self, *args): + _AHT.ushortArray_swiginit(self, _AHT.new_ushortArray(*args)) + + def push_back(self, x): + return _AHT.ushortArray_push_back(self, x) + + def front(self): + return _AHT.ushortArray_front(self) + + def back(self): + return _AHT.ushortArray_back(self) + + def assign(self, n, x): + return _AHT.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.ushortArray_resize(self, *args) + + def insert(self, *args): + return _AHT.ushortArray_insert(self, *args) + + def reserve(self, n): + return _AHT.ushortArray_reserve(self, n) + + def capacity(self): + return _AHT.ushortArray_capacity(self) + __swig_destroy__ = _AHT.delete_ushortArray + +# Register ushortArray in _AHT: +_AHT.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_ushort_2_1_rows + cols = _AHT._Matx_ushort_2_1_cols + channels = _AHT._Matx_ushort_2_1_channels + shortdim = _AHT._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_ushort_2_1___call__(self, i, j) + val = property(_AHT._Matx_ushort_2_1_val_get, _AHT._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_ushort_2_1_swiginit(self, _AHT.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _AHT: +_AHT._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _AHT._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _AHT._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _AHT._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _AHT._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _AHT._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _AHT._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_ushort_2_swiginit(self, _AHT.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_ushort_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _AHT: +_AHT._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _AHT._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_ushort_2_generic_type + channels = _AHT._DataType_Vec_ushort_2_channels + fmt = _AHT._DataType_Vec_ushort_2_fmt + + def __init__(self): + _AHT._DataType_Vec_ushort_2_swiginit(self, _AHT.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _AHT: +_AHT._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_ushort_3_1_rows + cols = _AHT._Matx_ushort_3_1_cols + channels = _AHT._Matx_ushort_3_1_channels + shortdim = _AHT._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_ushort_3_1___call__(self, i, j) + val = property(_AHT._Matx_ushort_3_1_val_get, _AHT._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_ushort_3_1_swiginit(self, _AHT.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _AHT: +_AHT._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _AHT._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _AHT._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _AHT._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _AHT._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _AHT._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _AHT._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_ushort_3_swiginit(self, _AHT.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_ushort_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _AHT: +_AHT._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _AHT._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_ushort_3_generic_type + channels = _AHT._DataType_Vec_ushort_3_channels + fmt = _AHT._DataType_Vec_ushort_3_fmt + + def __init__(self): + _AHT._DataType_Vec_ushort_3_swiginit(self, _AHT.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _AHT: +_AHT._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_ushort_4_1_rows + cols = _AHT._Matx_ushort_4_1_cols + channels = _AHT._Matx_ushort_4_1_channels + shortdim = _AHT._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_ushort_4_1___call__(self, i, j) + val = property(_AHT._Matx_ushort_4_1_val_get, _AHT._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_ushort_4_1_swiginit(self, _AHT.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _AHT: +_AHT._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _AHT._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _AHT._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _AHT._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _AHT._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _AHT._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _AHT._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_ushort_4_swiginit(self, _AHT.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_ushort_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _AHT: +_AHT._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _AHT._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_ushort_4_generic_type + channels = _AHT._DataType_Vec_ushort_4_channels + fmt = _AHT._DataType_Vec_ushort_4_fmt + + def __init__(self): + _AHT._DataType_Vec_ushort_4_swiginit(self, _AHT.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _AHT: +_AHT._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_int_value + + def __init__(self): + _AHT._cv_numpy_sizeof_int_swiginit(self, _AHT.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _AHT: +_AHT._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.intArray___nonzero__(self) + + def __bool__(self): + return _AHT.intArray___bool__(self) + + def __len__(self): + return _AHT.intArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.intArray___setitem__(self, *args) + + def pop(self): + return _AHT.intArray_pop(self) + + def append(self, x): + return _AHT.intArray_append(self, x) + + def empty(self): + return _AHT.intArray_empty(self) + + def size(self): + return _AHT.intArray_size(self) + + def swap(self, v): + return _AHT.intArray_swap(self, v) + + def begin(self): + return _AHT.intArray_begin(self) + + def end(self): + return _AHT.intArray_end(self) + + def rbegin(self): + return _AHT.intArray_rbegin(self) + + def rend(self): + return _AHT.intArray_rend(self) + + def clear(self): + return _AHT.intArray_clear(self) + + def get_allocator(self): + return _AHT.intArray_get_allocator(self) + + def pop_back(self): + return _AHT.intArray_pop_back(self) + + def erase(self, *args): + return _AHT.intArray_erase(self, *args) + + def __init__(self, *args): + _AHT.intArray_swiginit(self, _AHT.new_intArray(*args)) + + def push_back(self, x): + return _AHT.intArray_push_back(self, x) + + def front(self): + return _AHT.intArray_front(self) + + def back(self): + return _AHT.intArray_back(self) + + def assign(self, n, x): + return _AHT.intArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.intArray_resize(self, *args) + + def insert(self, *args): + return _AHT.intArray_insert(self, *args) + + def reserve(self, n): + return _AHT.intArray_reserve(self, n) + + def capacity(self): + return _AHT.intArray_capacity(self) + __swig_destroy__ = _AHT.delete_intArray + +# Register intArray in _AHT: +_AHT.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_2_1_rows + cols = _AHT._Matx_int_2_1_cols + channels = _AHT._Matx_int_2_1_channels + shortdim = _AHT._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_2_1___call__(self, i, j) + val = property(_AHT._Matx_int_2_1_val_get, _AHT._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_2_1_swiginit(self, _AHT.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _AHT: +_AHT._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _AHT._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _AHT._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _AHT._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _AHT._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _AHT._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _AHT._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_2_swiginit(self, _AHT.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_2 + +# Register _Vec_int_2 in _AHT: +_AHT._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _AHT._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_2_generic_type + channels = _AHT._DataType_Vec_int_2_channels + fmt = _AHT._DataType_Vec_int_2_fmt + + def __init__(self): + _AHT._DataType_Vec_int_2_swiginit(self, _AHT.new__DataType_Vec_int_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _AHT: +_AHT._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_3_1_rows + cols = _AHT._Matx_int_3_1_cols + channels = _AHT._Matx_int_3_1_channels + shortdim = _AHT._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_3_1___call__(self, i, j) + val = property(_AHT._Matx_int_3_1_val_get, _AHT._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_3_1_swiginit(self, _AHT.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _AHT: +_AHT._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _AHT._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _AHT._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _AHT._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _AHT._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _AHT._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _AHT._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_3_swiginit(self, _AHT.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_3 + +# Register _Vec_int_3 in _AHT: +_AHT._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _AHT._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_3_generic_type + channels = _AHT._DataType_Vec_int_3_channels + fmt = _AHT._DataType_Vec_int_3_fmt + + def __init__(self): + _AHT._DataType_Vec_int_3_swiginit(self, _AHT.new__DataType_Vec_int_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _AHT: +_AHT._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_4_1_rows + cols = _AHT._Matx_int_4_1_cols + channels = _AHT._Matx_int_4_1_channels + shortdim = _AHT._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_4_1___call__(self, i, j) + val = property(_AHT._Matx_int_4_1_val_get, _AHT._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_4_1_swiginit(self, _AHT.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _AHT: +_AHT._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _AHT._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _AHT._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _AHT._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _AHT._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _AHT._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _AHT._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_4_swiginit(self, _AHT.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_4 + +# Register _Vec_int_4 in _AHT: +_AHT._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _AHT._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_4_generic_type + channels = _AHT._DataType_Vec_int_4_channels + fmt = _AHT._DataType_Vec_int_4_fmt + + def __init__(self): + _AHT._DataType_Vec_int_4_swiginit(self, _AHT.new__DataType_Vec_int_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _AHT: +_AHT._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_6_1_rows + cols = _AHT._Matx_int_6_1_cols + channels = _AHT._Matx_int_6_1_channels + shortdim = _AHT._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_6_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_6_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_6_1___call__(self, i, j) + val = property(_AHT._Matx_int_6_1_val_get, _AHT._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_6_1_swiginit(self, _AHT.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_6_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _AHT: +_AHT._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _AHT._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _AHT._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _AHT._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _AHT._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _AHT._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _AHT._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_6_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_6_swiginit(self, _AHT.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_6___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_6 + +# Register _Vec_int_6 in _AHT: +_AHT._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _AHT._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_6_generic_type + channels = _AHT._DataType_Vec_int_6_channels + fmt = _AHT._DataType_Vec_int_6_fmt + + def __init__(self): + _AHT._DataType_Vec_int_6_swiginit(self, _AHT.new__DataType_Vec_int_6()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _AHT: +_AHT._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_int_8_1_rows + cols = _AHT._Matx_int_8_1_cols + channels = _AHT._Matx_int_8_1_channels + shortdim = _AHT._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_int_8_1_ddot(self, v) + + def t(self): + return _AHT._Matx_int_8_1_t(self) + + def mul(self, a): + return _AHT._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_int_8_1___call__(self, i, j) + val = property(_AHT._Matx_int_8_1_val_get, _AHT._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_int_8_1_swiginit(self, _AHT.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_int_8_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _AHT: +_AHT._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _AHT._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _AHT._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _AHT._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _AHT._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _AHT._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _AHT._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_int_8_all(alpha) + + def mul(self, v): + return _AHT._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_int_8_swiginit(self, _AHT.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_int_8___str__(self) + __swig_destroy__ = _AHT.delete__Vec_int_8 + +# Register _Vec_int_8 in _AHT: +_AHT._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _AHT._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_int_8_generic_type + channels = _AHT._DataType_Vec_int_8_channels + fmt = _AHT._DataType_Vec_int_8_fmt + + def __init__(self): + _AHT._DataType_Vec_int_8_swiginit(self, _AHT.new__DataType_Vec_int_8()) + __swig_destroy__ = _AHT.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _AHT: +_AHT._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_float_value + + def __init__(self): + _AHT._cv_numpy_sizeof_float_swiginit(self, _AHT.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _AHT: +_AHT._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.floatArray___nonzero__(self) + + def __bool__(self): + return _AHT.floatArray___bool__(self) + + def __len__(self): + return _AHT.floatArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.floatArray___setitem__(self, *args) + + def pop(self): + return _AHT.floatArray_pop(self) + + def append(self, x): + return _AHT.floatArray_append(self, x) + + def empty(self): + return _AHT.floatArray_empty(self) + + def size(self): + return _AHT.floatArray_size(self) + + def swap(self, v): + return _AHT.floatArray_swap(self, v) + + def begin(self): + return _AHT.floatArray_begin(self) + + def end(self): + return _AHT.floatArray_end(self) + + def rbegin(self): + return _AHT.floatArray_rbegin(self) + + def rend(self): + return _AHT.floatArray_rend(self) + + def clear(self): + return _AHT.floatArray_clear(self) + + def get_allocator(self): + return _AHT.floatArray_get_allocator(self) + + def pop_back(self): + return _AHT.floatArray_pop_back(self) + + def erase(self, *args): + return _AHT.floatArray_erase(self, *args) + + def __init__(self, *args): + _AHT.floatArray_swiginit(self, _AHT.new_floatArray(*args)) + + def push_back(self, x): + return _AHT.floatArray_push_back(self, x) + + def front(self): + return _AHT.floatArray_front(self) + + def back(self): + return _AHT.floatArray_back(self) + + def assign(self, n, x): + return _AHT.floatArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.floatArray_resize(self, *args) + + def insert(self, *args): + return _AHT.floatArray_insert(self, *args) + + def reserve(self, n): + return _AHT.floatArray_reserve(self, n) + + def capacity(self): + return _AHT.floatArray_capacity(self) + __swig_destroy__ = _AHT.delete_floatArray + +# Register floatArray in _AHT: +_AHT.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_2_1_rows + cols = _AHT._Matx_float_2_1_cols + channels = _AHT._Matx_float_2_1_channels + shortdim = _AHT._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_float_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_2_1___call__(self, i, j) + val = property(_AHT._Matx_float_2_1_val_get, _AHT._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_2_1_swiginit(self, _AHT.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _AHT: +_AHT._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _AHT._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _AHT._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _AHT._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _AHT._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _AHT._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _AHT._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_float_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_float_2_swiginit(self, _AHT.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_float_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_float_2 + +# Register _Vec_float_2 in _AHT: +_AHT._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _AHT._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_float_2_generic_type + channels = _AHT._DataType_Vec_float_2_channels + fmt = _AHT._DataType_Vec_float_2_fmt + + def __init__(self): + _AHT._DataType_Vec_float_2_swiginit(self, _AHT.new__DataType_Vec_float_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _AHT: +_AHT._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_3_1_rows + cols = _AHT._Matx_float_3_1_cols + channels = _AHT._Matx_float_3_1_channels + shortdim = _AHT._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_float_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_3_1___call__(self, i, j) + val = property(_AHT._Matx_float_3_1_val_get, _AHT._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_3_1_swiginit(self, _AHT.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _AHT: +_AHT._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _AHT._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _AHT._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _AHT._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _AHT._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _AHT._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _AHT._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_float_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_float_3_swiginit(self, _AHT.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_float_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_float_3 + +# Register _Vec_float_3 in _AHT: +_AHT._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _AHT._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_float_3_generic_type + channels = _AHT._DataType_Vec_float_3_channels + fmt = _AHT._DataType_Vec_float_3_fmt + + def __init__(self): + _AHT._DataType_Vec_float_3_swiginit(self, _AHT.new__DataType_Vec_float_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _AHT: +_AHT._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_4_1_rows + cols = _AHT._Matx_float_4_1_cols + channels = _AHT._Matx_float_4_1_channels + shortdim = _AHT._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_float_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_4_1___call__(self, i, j) + val = property(_AHT._Matx_float_4_1_val_get, _AHT._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_4_1_swiginit(self, _AHT.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _AHT: +_AHT._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _AHT._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _AHT._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _AHT._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _AHT._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _AHT._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _AHT._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_float_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_float_4_swiginit(self, _AHT.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_float_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_float_4 + +# Register _Vec_float_4 in _AHT: +_AHT._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _AHT._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_float_4_generic_type + channels = _AHT._DataType_Vec_float_4_channels + fmt = _AHT._DataType_Vec_float_4_fmt + + def __init__(self): + _AHT._DataType_Vec_float_4_swiginit(self, _AHT.new__DataType_Vec_float_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _AHT: +_AHT._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_6_1_rows + cols = _AHT._Matx_float_6_1_cols + channels = _AHT._Matx_float_6_1_channels + shortdim = _AHT._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_6_1_ddot(self, v) + + def t(self): + return _AHT._Matx_float_6_1_t(self) + + def mul(self, a): + return _AHT._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_6_1___call__(self, i, j) + val = property(_AHT._Matx_float_6_1_val_get, _AHT._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_6_1_swiginit(self, _AHT.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_6_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _AHT: +_AHT._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _AHT._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _AHT._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _AHT._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _AHT._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _AHT._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _AHT._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_float_6_all(alpha) + + def mul(self, v): + return _AHT._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_float_6_swiginit(self, _AHT.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_float_6___str__(self) + __swig_destroy__ = _AHT.delete__Vec_float_6 + +# Register _Vec_float_6 in _AHT: +_AHT._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _AHT._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_float_6_generic_type + channels = _AHT._DataType_Vec_float_6_channels + fmt = _AHT._DataType_Vec_float_6_fmt + + def __init__(self): + _AHT._DataType_Vec_float_6_swiginit(self, _AHT.new__DataType_Vec_float_6()) + __swig_destroy__ = _AHT.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _AHT: +_AHT._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_double_value + + def __init__(self): + _AHT._cv_numpy_sizeof_double_swiginit(self, _AHT.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _AHT: +_AHT._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _AHT.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _AHT.doubleArray___nonzero__(self) + + def __bool__(self): + return _AHT.doubleArray___bool__(self) + + def __len__(self): + return _AHT.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _AHT.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _AHT.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _AHT.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _AHT.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _AHT.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _AHT.doubleArray___setitem__(self, *args) + + def pop(self): + return _AHT.doubleArray_pop(self) + + def append(self, x): + return _AHT.doubleArray_append(self, x) + + def empty(self): + return _AHT.doubleArray_empty(self) + + def size(self): + return _AHT.doubleArray_size(self) + + def swap(self, v): + return _AHT.doubleArray_swap(self, v) + + def begin(self): + return _AHT.doubleArray_begin(self) + + def end(self): + return _AHT.doubleArray_end(self) + + def rbegin(self): + return _AHT.doubleArray_rbegin(self) + + def rend(self): + return _AHT.doubleArray_rend(self) + + def clear(self): + return _AHT.doubleArray_clear(self) + + def get_allocator(self): + return _AHT.doubleArray_get_allocator(self) + + def pop_back(self): + return _AHT.doubleArray_pop_back(self) + + def erase(self, *args): + return _AHT.doubleArray_erase(self, *args) + + def __init__(self, *args): + _AHT.doubleArray_swiginit(self, _AHT.new_doubleArray(*args)) + + def push_back(self, x): + return _AHT.doubleArray_push_back(self, x) + + def front(self): + return _AHT.doubleArray_front(self) + + def back(self): + return _AHT.doubleArray_back(self) + + def assign(self, n, x): + return _AHT.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _AHT.doubleArray_resize(self, *args) + + def insert(self, *args): + return _AHT.doubleArray_insert(self, *args) + + def reserve(self, n): + return _AHT.doubleArray_reserve(self, n) + + def capacity(self): + return _AHT.doubleArray_capacity(self) + __swig_destroy__ = _AHT.delete_doubleArray + +# Register doubleArray in _AHT: +_AHT.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_2_1_rows + cols = _AHT._Matx_double_2_1_cols + channels = _AHT._Matx_double_2_1_channels + shortdim = _AHT._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_2_1_ddot(self, v) + + def t(self): + return _AHT._Matx_double_2_1_t(self) + + def mul(self, a): + return _AHT._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_2_1___call__(self, i, j) + val = property(_AHT._Matx_double_2_1_val_get, _AHT._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_2_1_swiginit(self, _AHT.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_2_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _AHT: +_AHT._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _AHT._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _AHT._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _AHT._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _AHT._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _AHT._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _AHT._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_double_2_all(alpha) + + def mul(self, v): + return _AHT._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_double_2_swiginit(self, _AHT.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_double_2___str__(self) + __swig_destroy__ = _AHT.delete__Vec_double_2 + +# Register _Vec_double_2 in _AHT: +_AHT._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _AHT._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_double_2_generic_type + channels = _AHT._DataType_Vec_double_2_channels + fmt = _AHT._DataType_Vec_double_2_fmt + + def __init__(self): + _AHT._DataType_Vec_double_2_swiginit(self, _AHT.new__DataType_Vec_double_2()) + __swig_destroy__ = _AHT.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _AHT: +_AHT._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_3_1_rows + cols = _AHT._Matx_double_3_1_cols + channels = _AHT._Matx_double_3_1_channels + shortdim = _AHT._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_3_1_ddot(self, v) + + def t(self): + return _AHT._Matx_double_3_1_t(self) + + def mul(self, a): + return _AHT._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_3_1___call__(self, i, j) + val = property(_AHT._Matx_double_3_1_val_get, _AHT._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_3_1_swiginit(self, _AHT.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_3_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _AHT: +_AHT._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _AHT._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _AHT._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _AHT._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _AHT._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _AHT._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _AHT._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_double_3_all(alpha) + + def mul(self, v): + return _AHT._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_double_3_swiginit(self, _AHT.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_double_3___str__(self) + __swig_destroy__ = _AHT.delete__Vec_double_3 + +# Register _Vec_double_3 in _AHT: +_AHT._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _AHT._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_double_3_generic_type + channels = _AHT._DataType_Vec_double_3_channels + fmt = _AHT._DataType_Vec_double_3_fmt + + def __init__(self): + _AHT._DataType_Vec_double_3_swiginit(self, _AHT.new__DataType_Vec_double_3()) + __swig_destroy__ = _AHT.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _AHT: +_AHT._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_4_1_rows + cols = _AHT._Matx_double_4_1_cols + channels = _AHT._Matx_double_4_1_channels + shortdim = _AHT._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_4_1_ddot(self, v) + + def t(self): + return _AHT._Matx_double_4_1_t(self) + + def mul(self, a): + return _AHT._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_4_1___call__(self, i, j) + val = property(_AHT._Matx_double_4_1_val_get, _AHT._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_4_1_swiginit(self, _AHT.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_4_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _AHT: +_AHT._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _AHT._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _AHT._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _AHT._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _AHT._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _AHT._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _AHT._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_double_4_all(alpha) + + def mul(self, v): + return _AHT._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_double_4_swiginit(self, _AHT.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_double_4___str__(self) + __swig_destroy__ = _AHT.delete__Vec_double_4 + +# Register _Vec_double_4 in _AHT: +_AHT._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _AHT._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_double_4_generic_type + channels = _AHT._DataType_Vec_double_4_channels + fmt = _AHT._DataType_Vec_double_4_fmt + + def __init__(self): + _AHT._DataType_Vec_double_4_swiginit(self, _AHT.new__DataType_Vec_double_4()) + __swig_destroy__ = _AHT.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _AHT: +_AHT._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_6_1_rows + cols = _AHT._Matx_double_6_1_cols + channels = _AHT._Matx_double_6_1_channels + shortdim = _AHT._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_6_1_ddot(self, v) + + def t(self): + return _AHT._Matx_double_6_1_t(self) + + def mul(self, a): + return _AHT._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_6_1___call__(self, i, j) + val = property(_AHT._Matx_double_6_1_val_get, _AHT._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_6_1_swiginit(self, _AHT.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_6_1___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _AHT: +_AHT._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _AHT._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _AHT._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _AHT._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _AHT._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _AHT._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _AHT._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _AHT._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _AHT._Vec_double_6_all(alpha) + + def mul(self, v): + return _AHT._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _AHT._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Vec_double_6_swiginit(self, _AHT.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Vec_double_6___str__(self) + __swig_destroy__ = _AHT.delete__Vec_double_6 + +# Register _Vec_double_6 in _AHT: +_AHT._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _AHT._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _AHT._DataType_Vec_double_6_generic_type + channels = _AHT._DataType_Vec_double_6_channels + fmt = _AHT._DataType_Vec_double_6_fmt + + def __init__(self): + _AHT._DataType_Vec_double_6_swiginit(self, _AHT.new__DataType_Vec_double_6()) + __swig_destroy__ = _AHT.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _AHT: +_AHT._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _AHT._mat__np_array_constructor_swiginit(self, _AHT.new__mat__np_array_constructor()) + __swig_destroy__ = _AHT.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _AHT: +_AHT._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _AHT._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _AHT._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_uchar_value + + def __init__(self): + _AHT._cv_numpy_sizeof_uchar_swiginit(self, _AHT.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _AHT: +_AHT._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__uchar_create(self, *args) + + def cross(self, m): + return _AHT._Mat__uchar_cross(self, m) + + def row(self, y): + return _AHT._Mat__uchar_row(self, y) + + def col(self, x): + return _AHT._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__uchar_diag(self, d) + + def clone(self): + return _AHT._Mat__uchar_clone(self) + + def elemSize(self): + return _AHT._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__uchar_elemSize1(self) + + def type(self): + return _AHT._Mat__uchar_type(self) + + def depth(self): + return _AHT._Mat__uchar_depth(self) + + def channels(self): + return _AHT._Mat__uchar_channels(self) + + def step1(self, i=0): + return _AHT._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__uchar_swiginit(self, _AHT.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__uchar___str__(self) + __swig_destroy__ = _AHT.delete__Mat__uchar + +# Register _Mat__uchar in _AHT: +_AHT._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2b_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _AHT: +_AHT._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2b_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2b_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2b_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2b_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2b_type(self) + + def depth(self): + return _AHT._Mat__Vec2b_depth(self) + + def channels(self): + return _AHT._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2b_swiginit(self, _AHT.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2b___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _AHT: +_AHT._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3b_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _AHT: +_AHT._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3b_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3b_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3b_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3b_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3b_type(self) + + def depth(self): + return _AHT._Mat__Vec3b_depth(self) + + def channels(self): + return _AHT._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3b_swiginit(self, _AHT.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3b___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _AHT: +_AHT._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4b_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _AHT: +_AHT._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4b_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4b_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4b_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4b_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4b_type(self) + + def depth(self): + return _AHT._Mat__Vec4b_depth(self) + + def channels(self): + return _AHT._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4b_swiginit(self, _AHT.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4b___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _AHT: +_AHT._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__short_create(self, *args) + + def cross(self, m): + return _AHT._Mat__short_cross(self, m) + + def row(self, y): + return _AHT._Mat__short_row(self, y) + + def col(self, x): + return _AHT._Mat__short_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__short_diag(self, d) + + def clone(self): + return _AHT._Mat__short_clone(self) + + def elemSize(self): + return _AHT._Mat__short_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__short_elemSize1(self) + + def type(self): + return _AHT._Mat__short_type(self) + + def depth(self): + return _AHT._Mat__short_depth(self) + + def channels(self): + return _AHT._Mat__short_channels(self) + + def step1(self, i=0): + return _AHT._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__short___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__short_swiginit(self, _AHT.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__short___str__(self) + __swig_destroy__ = _AHT.delete__Mat__short + +# Register _Mat__short in _AHT: +_AHT._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2s_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _AHT: +_AHT._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2s_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2s_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2s_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2s_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2s_type(self) + + def depth(self): + return _AHT._Mat__Vec2s_depth(self) + + def channels(self): + return _AHT._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2s_swiginit(self, _AHT.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2s___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _AHT: +_AHT._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3s_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _AHT: +_AHT._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3s_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3s_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3s_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3s_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3s_type(self) + + def depth(self): + return _AHT._Mat__Vec3s_depth(self) + + def channels(self): + return _AHT._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3s_swiginit(self, _AHT.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3s___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _AHT: +_AHT._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4s_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _AHT: +_AHT._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4s_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4s_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4s_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4s_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4s_type(self) + + def depth(self): + return _AHT._Mat__Vec4s_depth(self) + + def channels(self): + return _AHT._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4s_swiginit(self, _AHT.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4s___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _AHT: +_AHT._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__ushort_create(self, *args) + + def cross(self, m): + return _AHT._Mat__ushort_cross(self, m) + + def row(self, y): + return _AHT._Mat__ushort_row(self, y) + + def col(self, x): + return _AHT._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__ushort_diag(self, d) + + def clone(self): + return _AHT._Mat__ushort_clone(self) + + def elemSize(self): + return _AHT._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__ushort_elemSize1(self) + + def type(self): + return _AHT._Mat__ushort_type(self) + + def depth(self): + return _AHT._Mat__ushort_depth(self) + + def channels(self): + return _AHT._Mat__ushort_channels(self) + + def step1(self, i=0): + return _AHT._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__ushort_swiginit(self, _AHT.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__ushort___str__(self) + __swig_destroy__ = _AHT.delete__Mat__ushort + +# Register _Mat__ushort in _AHT: +_AHT._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2w_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _AHT: +_AHT._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2w_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2w_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2w_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2w_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2w_type(self) + + def depth(self): + return _AHT._Mat__Vec2w_depth(self) + + def channels(self): + return _AHT._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2w_swiginit(self, _AHT.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2w___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _AHT: +_AHT._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3w_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _AHT: +_AHT._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3w_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3w_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3w_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3w_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3w_type(self) + + def depth(self): + return _AHT._Mat__Vec3w_depth(self) + + def channels(self): + return _AHT._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3w_swiginit(self, _AHT.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3w___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _AHT: +_AHT._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4w_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _AHT: +_AHT._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4w_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4w_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4w_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4w_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4w_type(self) + + def depth(self): + return _AHT._Mat__Vec4w_depth(self) + + def channels(self): + return _AHT._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4w_swiginit(self, _AHT.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4w___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _AHT: +_AHT._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__int_create(self, *args) + + def cross(self, m): + return _AHT._Mat__int_cross(self, m) + + def row(self, y): + return _AHT._Mat__int_row(self, y) + + def col(self, x): + return _AHT._Mat__int_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__int_diag(self, d) + + def clone(self): + return _AHT._Mat__int_clone(self) + + def elemSize(self): + return _AHT._Mat__int_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__int_elemSize1(self) + + def type(self): + return _AHT._Mat__int_type(self) + + def depth(self): + return _AHT._Mat__int_depth(self) + + def channels(self): + return _AHT._Mat__int_channels(self) + + def step1(self, i=0): + return _AHT._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__int___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__int_swiginit(self, _AHT.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__int___str__(self) + __swig_destroy__ = _AHT.delete__Mat__int + +# Register _Mat__int in _AHT: +_AHT._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2i_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _AHT: +_AHT._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2i_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2i_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2i_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2i_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2i_type(self) + + def depth(self): + return _AHT._Mat__Vec2i_depth(self) + + def channels(self): + return _AHT._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2i_swiginit(self, _AHT.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2i___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _AHT: +_AHT._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3i_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _AHT: +_AHT._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3i_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3i_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3i_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3i_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3i_type(self) + + def depth(self): + return _AHT._Mat__Vec3i_depth(self) + + def channels(self): + return _AHT._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3i_swiginit(self, _AHT.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3i___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _AHT: +_AHT._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4i_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _AHT: +_AHT._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4i_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4i_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4i_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4i_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4i_type(self) + + def depth(self): + return _AHT._Mat__Vec4i_depth(self) + + def channels(self): + return _AHT._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4i_swiginit(self, _AHT.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4i___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _AHT: +_AHT._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__float_create(self, *args) + + def cross(self, m): + return _AHT._Mat__float_cross(self, m) + + def row(self, y): + return _AHT._Mat__float_row(self, y) + + def col(self, x): + return _AHT._Mat__float_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__float_diag(self, d) + + def clone(self): + return _AHT._Mat__float_clone(self) + + def elemSize(self): + return _AHT._Mat__float_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__float_elemSize1(self) + + def type(self): + return _AHT._Mat__float_type(self) + + def depth(self): + return _AHT._Mat__float_depth(self) + + def channels(self): + return _AHT._Mat__float_channels(self) + + def step1(self, i=0): + return _AHT._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__float___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__float_swiginit(self, _AHT.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__float___str__(self) + __swig_destroy__ = _AHT.delete__Mat__float + +# Register _Mat__float in _AHT: +_AHT._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2f_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _AHT: +_AHT._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2f_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2f_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2f_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2f_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2f_type(self) + + def depth(self): + return _AHT._Mat__Vec2f_depth(self) + + def channels(self): + return _AHT._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2f_swiginit(self, _AHT.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2f___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _AHT: +_AHT._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3f_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _AHT: +_AHT._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3f_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3f_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3f_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3f_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3f_type(self) + + def depth(self): + return _AHT._Mat__Vec3f_depth(self) + + def channels(self): + return _AHT._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3f_swiginit(self, _AHT.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3f___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _AHT: +_AHT._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4f_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _AHT: +_AHT._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4f_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4f_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4f_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4f_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4f_type(self) + + def depth(self): + return _AHT._Mat__Vec4f_depth(self) + + def channels(self): + return _AHT._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4f_swiginit(self, _AHT.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4f___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _AHT: +_AHT._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__double_create(self, *args) + + def cross(self, m): + return _AHT._Mat__double_cross(self, m) + + def row(self, y): + return _AHT._Mat__double_row(self, y) + + def col(self, x): + return _AHT._Mat__double_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__double_diag(self, d) + + def clone(self): + return _AHT._Mat__double_clone(self) + + def elemSize(self): + return _AHT._Mat__double_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__double_elemSize1(self) + + def type(self): + return _AHT._Mat__double_type(self) + + def depth(self): + return _AHT._Mat__double_depth(self) + + def channels(self): + return _AHT._Mat__double_channels(self) + + def step1(self, i=0): + return _AHT._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__double___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__double_swiginit(self, _AHT.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__double___str__(self) + __swig_destroy__ = _AHT.delete__Mat__double + +# Register _Mat__double in _AHT: +_AHT._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec2d_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _AHT: +_AHT._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec2d_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec2d_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec2d_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec2d_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec2d_type(self) + + def depth(self): + return _AHT._Mat__Vec2d_depth(self) + + def channels(self): + return _AHT._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec2d_swiginit(self, _AHT.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec2d___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _AHT: +_AHT._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec3d_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _AHT: +_AHT._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec3d_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec3d_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec3d_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec3d_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec3d_type(self) + + def depth(self): + return _AHT._Mat__Vec3d_depth(self) + + def channels(self): + return _AHT._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec3d_swiginit(self, _AHT.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec3d___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _AHT: +_AHT._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _AHT._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _AHT._cv_numpy_sizeof_Vec4d_swiginit(self, _AHT.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _AHT.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _AHT: +_AHT._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _AHT._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _AHT._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _AHT._Mat__Vec4d_row(self, y) + + def col(self, x): + return _AHT._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _AHT._Mat__Vec4d_diag(self, d) + + def clone(self): + return _AHT._Mat__Vec4d_clone(self) + + def elemSize(self): + return _AHT._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _AHT._Mat__Vec4d_elemSize1(self) + + def type(self): + return _AHT._Mat__Vec4d_type(self) + + def depth(self): + return _AHT._Mat__Vec4d_depth(self) + + def channels(self): + return _AHT._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _AHT._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _AHT._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _AHT._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _AHT._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _AHT._Mat__Vec4d_swiginit(self, _AHT.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _AHT._Mat__Vec4d___str__(self) + __swig_destroy__ = _AHT.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _AHT: +_AHT._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_1_2_rows + cols = _AHT._Matx_float_1_2_cols + channels = _AHT._Matx_float_1_2_channels + shortdim = _AHT._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_1_2_ddot(self, v) + + def t(self): + return _AHT._Matx_float_1_2_t(self) + + def mul(self, a): + return _AHT._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_1_2___call__(self, i, j) + val = property(_AHT._Matx_float_1_2_val_get, _AHT._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_1_2_swiginit(self, _AHT.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_1_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _AHT: +_AHT._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _AHT._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _AHT._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _AHT._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _AHT._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _AHT._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _AHT._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_1_2_rows + cols = _AHT._Matx_double_1_2_cols + channels = _AHT._Matx_double_1_2_channels + shortdim = _AHT._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_1_2_ddot(self, v) + + def t(self): + return _AHT._Matx_double_1_2_t(self) + + def mul(self, a): + return _AHT._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_1_2___call__(self, i, j) + val = property(_AHT._Matx_double_1_2_val_get, _AHT._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_1_2_swiginit(self, _AHT.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_1_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _AHT: +_AHT._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _AHT._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _AHT._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _AHT._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _AHT._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _AHT._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _AHT._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_1_3_rows + cols = _AHT._Matx_float_1_3_cols + channels = _AHT._Matx_float_1_3_channels + shortdim = _AHT._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_1_3_ddot(self, v) + + def t(self): + return _AHT._Matx_float_1_3_t(self) + + def mul(self, a): + return _AHT._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_1_3___call__(self, i, j) + val = property(_AHT._Matx_float_1_3_val_get, _AHT._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_1_3_swiginit(self, _AHT.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_1_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _AHT: +_AHT._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _AHT._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _AHT._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _AHT._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _AHT._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _AHT._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _AHT._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_1_3_rows + cols = _AHT._Matx_double_1_3_cols + channels = _AHT._Matx_double_1_3_channels + shortdim = _AHT._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_1_3_ddot(self, v) + + def t(self): + return _AHT._Matx_double_1_3_t(self) + + def mul(self, a): + return _AHT._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_1_3___call__(self, i, j) + val = property(_AHT._Matx_double_1_3_val_get, _AHT._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_1_3_swiginit(self, _AHT.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_1_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _AHT: +_AHT._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _AHT._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _AHT._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _AHT._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _AHT._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _AHT._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _AHT._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_1_4_rows + cols = _AHT._Matx_float_1_4_cols + channels = _AHT._Matx_float_1_4_channels + shortdim = _AHT._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_1_4_ddot(self, v) + + def t(self): + return _AHT._Matx_float_1_4_t(self) + + def mul(self, a): + return _AHT._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_1_4___call__(self, i, j) + val = property(_AHT._Matx_float_1_4_val_get, _AHT._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_1_4_swiginit(self, _AHT.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_1_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _AHT: +_AHT._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _AHT._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _AHT._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _AHT._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _AHT._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _AHT._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _AHT._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_1_4_rows + cols = _AHT._Matx_double_1_4_cols + channels = _AHT._Matx_double_1_4_channels + shortdim = _AHT._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_1_4_ddot(self, v) + + def t(self): + return _AHT._Matx_double_1_4_t(self) + + def mul(self, a): + return _AHT._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_1_4___call__(self, i, j) + val = property(_AHT._Matx_double_1_4_val_get, _AHT._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_1_4_swiginit(self, _AHT.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_1_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _AHT: +_AHT._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _AHT._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _AHT._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _AHT._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _AHT._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _AHT._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _AHT._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_1_6_rows + cols = _AHT._Matx_float_1_6_cols + channels = _AHT._Matx_float_1_6_channels + shortdim = _AHT._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_1_6_ddot(self, v) + + def t(self): + return _AHT._Matx_float_1_6_t(self) + + def mul(self, a): + return _AHT._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_1_6___call__(self, i, j) + val = property(_AHT._Matx_float_1_6_val_get, _AHT._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_1_6_swiginit(self, _AHT.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_1_6___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _AHT: +_AHT._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _AHT._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _AHT._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _AHT._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _AHT._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _AHT._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _AHT._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_1_6_rows + cols = _AHT._Matx_double_1_6_cols + channels = _AHT._Matx_double_1_6_channels + shortdim = _AHT._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_1_6_ddot(self, v) + + def t(self): + return _AHT._Matx_double_1_6_t(self) + + def mul(self, a): + return _AHT._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_1_6___call__(self, i, j) + val = property(_AHT._Matx_double_1_6_val_get, _AHT._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_1_6_swiginit(self, _AHT.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_1_6___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _AHT: +_AHT._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _AHT._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _AHT._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _AHT._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _AHT._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _AHT._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _AHT._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_2_2_rows + cols = _AHT._Matx_float_2_2_cols + channels = _AHT._Matx_float_2_2_channels + shortdim = _AHT._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_2_2_ddot(self, v) + + def t(self): + return _AHT._Matx_float_2_2_t(self) + + def mul(self, a): + return _AHT._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_2_2___call__(self, i, j) + val = property(_AHT._Matx_float_2_2_val_get, _AHT._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_2_2_swiginit(self, _AHT.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_2_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _AHT: +_AHT._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _AHT._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _AHT._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _AHT._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _AHT._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _AHT._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _AHT._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_2_2_rows + cols = _AHT._Matx_double_2_2_cols + channels = _AHT._Matx_double_2_2_channels + shortdim = _AHT._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_2_2_ddot(self, v) + + def t(self): + return _AHT._Matx_double_2_2_t(self) + + def mul(self, a): + return _AHT._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_2_2___call__(self, i, j) + val = property(_AHT._Matx_double_2_2_val_get, _AHT._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_2_2_swiginit(self, _AHT.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_2_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _AHT: +_AHT._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _AHT._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _AHT._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _AHT._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _AHT._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _AHT._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _AHT._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_2_3_rows + cols = _AHT._Matx_float_2_3_cols + channels = _AHT._Matx_float_2_3_channels + shortdim = _AHT._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_2_3_ddot(self, v) + + def t(self): + return _AHT._Matx_float_2_3_t(self) + + def mul(self, a): + return _AHT._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_2_3___call__(self, i, j) + val = property(_AHT._Matx_float_2_3_val_get, _AHT._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_2_3_swiginit(self, _AHT.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_2_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _AHT: +_AHT._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _AHT._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _AHT._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _AHT._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _AHT._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _AHT._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _AHT._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_2_3_rows + cols = _AHT._Matx_double_2_3_cols + channels = _AHT._Matx_double_2_3_channels + shortdim = _AHT._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_2_3_ddot(self, v) + + def t(self): + return _AHT._Matx_double_2_3_t(self) + + def mul(self, a): + return _AHT._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_2_3___call__(self, i, j) + val = property(_AHT._Matx_double_2_3_val_get, _AHT._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_2_3_swiginit(self, _AHT.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_2_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _AHT: +_AHT._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _AHT._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _AHT._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _AHT._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _AHT._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _AHT._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _AHT._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_3_2_rows + cols = _AHT._Matx_float_3_2_cols + channels = _AHT._Matx_float_3_2_channels + shortdim = _AHT._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_3_2_ddot(self, v) + + def t(self): + return _AHT._Matx_float_3_2_t(self) + + def mul(self, a): + return _AHT._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_3_2___call__(self, i, j) + val = property(_AHT._Matx_float_3_2_val_get, _AHT._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_3_2_swiginit(self, _AHT.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_3_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _AHT: +_AHT._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _AHT._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _AHT._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _AHT._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _AHT._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _AHT._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _AHT._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_3_2_rows + cols = _AHT._Matx_double_3_2_cols + channels = _AHT._Matx_double_3_2_channels + shortdim = _AHT._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_3_2_ddot(self, v) + + def t(self): + return _AHT._Matx_double_3_2_t(self) + + def mul(self, a): + return _AHT._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_3_2___call__(self, i, j) + val = property(_AHT._Matx_double_3_2_val_get, _AHT._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_3_2_swiginit(self, _AHT.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_3_2___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _AHT: +_AHT._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _AHT._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _AHT._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _AHT._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _AHT._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _AHT._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _AHT._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_3_3_rows + cols = _AHT._Matx_float_3_3_cols + channels = _AHT._Matx_float_3_3_channels + shortdim = _AHT._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_3_3_ddot(self, v) + + def t(self): + return _AHT._Matx_float_3_3_t(self) + + def mul(self, a): + return _AHT._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_3_3___call__(self, i, j) + val = property(_AHT._Matx_float_3_3_val_get, _AHT._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_3_3_swiginit(self, _AHT.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_3_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _AHT: +_AHT._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _AHT._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _AHT._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _AHT._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _AHT._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _AHT._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _AHT._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_3_3_rows + cols = _AHT._Matx_double_3_3_cols + channels = _AHT._Matx_double_3_3_channels + shortdim = _AHT._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_3_3_ddot(self, v) + + def t(self): + return _AHT._Matx_double_3_3_t(self) + + def mul(self, a): + return _AHT._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_3_3___call__(self, i, j) + val = property(_AHT._Matx_double_3_3_val_get, _AHT._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_3_3_swiginit(self, _AHT.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_3_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _AHT: +_AHT._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _AHT._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _AHT._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _AHT._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _AHT._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _AHT._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _AHT._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_3_4_rows + cols = _AHT._Matx_float_3_4_cols + channels = _AHT._Matx_float_3_4_channels + shortdim = _AHT._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_3_4_ddot(self, v) + + def t(self): + return _AHT._Matx_float_3_4_t(self) + + def mul(self, a): + return _AHT._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_3_4___call__(self, i, j) + val = property(_AHT._Matx_float_3_4_val_get, _AHT._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_3_4_swiginit(self, _AHT.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_3_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _AHT: +_AHT._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _AHT._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _AHT._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _AHT._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _AHT._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _AHT._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _AHT._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_3_4_rows + cols = _AHT._Matx_double_3_4_cols + channels = _AHT._Matx_double_3_4_channels + shortdim = _AHT._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_3_4_ddot(self, v) + + def t(self): + return _AHT._Matx_double_3_4_t(self) + + def mul(self, a): + return _AHT._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_3_4___call__(self, i, j) + val = property(_AHT._Matx_double_3_4_val_get, _AHT._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_3_4_swiginit(self, _AHT.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_3_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _AHT: +_AHT._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _AHT._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _AHT._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _AHT._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _AHT._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _AHT._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _AHT._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_4_3_rows + cols = _AHT._Matx_float_4_3_cols + channels = _AHT._Matx_float_4_3_channels + shortdim = _AHT._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_4_3_ddot(self, v) + + def t(self): + return _AHT._Matx_float_4_3_t(self) + + def mul(self, a): + return _AHT._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_4_3___call__(self, i, j) + val = property(_AHT._Matx_float_4_3_val_get, _AHT._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_4_3_swiginit(self, _AHT.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_4_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _AHT: +_AHT._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _AHT._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _AHT._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _AHT._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _AHT._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _AHT._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _AHT._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_4_3_rows + cols = _AHT._Matx_double_4_3_cols + channels = _AHT._Matx_double_4_3_channels + shortdim = _AHT._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_4_3_ddot(self, v) + + def t(self): + return _AHT._Matx_double_4_3_t(self) + + def mul(self, a): + return _AHT._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_4_3___call__(self, i, j) + val = property(_AHT._Matx_double_4_3_val_get, _AHT._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_4_3_swiginit(self, _AHT.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_4_3___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _AHT: +_AHT._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _AHT._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _AHT._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _AHT._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _AHT._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _AHT._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _AHT._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_4_4_rows + cols = _AHT._Matx_float_4_4_cols + channels = _AHT._Matx_float_4_4_channels + shortdim = _AHT._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_4_4_ddot(self, v) + + def t(self): + return _AHT._Matx_float_4_4_t(self) + + def mul(self, a): + return _AHT._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_4_4___call__(self, i, j) + val = property(_AHT._Matx_float_4_4_val_get, _AHT._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_4_4_swiginit(self, _AHT.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_4_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _AHT: +_AHT._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _AHT._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _AHT._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _AHT._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _AHT._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _AHT._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _AHT._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_4_4_rows + cols = _AHT._Matx_double_4_4_cols + channels = _AHT._Matx_double_4_4_channels + shortdim = _AHT._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_4_4_ddot(self, v) + + def t(self): + return _AHT._Matx_double_4_4_t(self) + + def mul(self, a): + return _AHT._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_4_4___call__(self, i, j) + val = property(_AHT._Matx_double_4_4_val_get, _AHT._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_4_4_swiginit(self, _AHT.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_4_4___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _AHT: +_AHT._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _AHT._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _AHT._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _AHT._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _AHT._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _AHT._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _AHT._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_float_6_6_rows + cols = _AHT._Matx_float_6_6_cols + channels = _AHT._Matx_float_6_6_channels + shortdim = _AHT._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _AHT._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _AHT._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_float_6_6_ddot(self, v) + + def t(self): + return _AHT._Matx_float_6_6_t(self) + + def mul(self, a): + return _AHT._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _AHT._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_float_6_6___call__(self, i, j) + val = property(_AHT._Matx_float_6_6_val_get, _AHT._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_float_6_6_swiginit(self, _AHT.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_float_6_6___str__(self) + __swig_destroy__ = _AHT.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _AHT: +_AHT._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _AHT._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _AHT._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _AHT._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _AHT._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _AHT._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _AHT._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _AHT._Matx_double_6_6_rows + cols = _AHT._Matx_double_6_6_cols + channels = _AHT._Matx_double_6_6_channels + shortdim = _AHT._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _AHT._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _AHT._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _AHT._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _AHT._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _AHT._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _AHT._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _AHT._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _AHT._Matx_double_6_6_ddot(self, v) + + def t(self): + return _AHT._Matx_double_6_6_t(self) + + def mul(self, a): + return _AHT._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _AHT._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _AHT._Matx_double_6_6___call__(self, i, j) + val = property(_AHT._Matx_double_6_6_val_get, _AHT._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _AHT._Matx_double_6_6_swiginit(self, _AHT.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _AHT._Matx_double_6_6___str__(self) + __swig_destroy__ = _AHT.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _AHT: +_AHT._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _AHT._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _AHT._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _AHT._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _AHT._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _AHT._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _AHT._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Point__int_swiginit(self, _AHT.new__Point__int(*args)) + + def dot(self, pt): + return _AHT._Point__int_dot(self, pt) + + def ddot(self, pt): + return _AHT._Point__int_ddot(self, pt) + + def cross(self, pt): + return _AHT._Point__int_cross(self, pt) + x = property(_AHT._Point__int_x_get, _AHT._Point__int_x_set) + y = property(_AHT._Point__int_y_get, _AHT._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _AHT._Point__int___str__(self) + __swig_destroy__ = _AHT.delete__Point__int + +# Register _Point__int in _AHT: +_AHT._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Point__float_swiginit(self, _AHT.new__Point__float(*args)) + + def dot(self, pt): + return _AHT._Point__float_dot(self, pt) + + def ddot(self, pt): + return _AHT._Point__float_ddot(self, pt) + + def cross(self, pt): + return _AHT._Point__float_cross(self, pt) + x = property(_AHT._Point__float_x_get, _AHT._Point__float_x_set) + y = property(_AHT._Point__float_y_get, _AHT._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _AHT._Point__float___str__(self) + __swig_destroy__ = _AHT.delete__Point__float + +# Register _Point__float in _AHT: +_AHT._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Point__double_swiginit(self, _AHT.new__Point__double(*args)) + + def dot(self, pt): + return _AHT._Point__double_dot(self, pt) + + def ddot(self, pt): + return _AHT._Point__double_ddot(self, pt) + + def cross(self, pt): + return _AHT._Point__double_cross(self, pt) + x = property(_AHT._Point__double_x_get, _AHT._Point__double_x_set) + y = property(_AHT._Point__double_y_get, _AHT._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _AHT._Point__double___str__(self) + __swig_destroy__ = _AHT.delete__Point__double + +# Register _Point__double in _AHT: +_AHT._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Rect__int_swiginit(self, _AHT.new__Rect__int(*args)) + + def tl(self): + return _AHT._Rect__int_tl(self) + + def br(self): + return _AHT._Rect__int_br(self) + + def size(self): + return _AHT._Rect__int_size(self) + + def area(self): + return _AHT._Rect__int_area(self) + + def contains(self, pt): + return _AHT._Rect__int_contains(self, pt) + x = property(_AHT._Rect__int_x_get, _AHT._Rect__int_x_set) + y = property(_AHT._Rect__int_y_get, _AHT._Rect__int_y_set) + width = property(_AHT._Rect__int_width_get, _AHT._Rect__int_width_set) + height = property(_AHT._Rect__int_height_get, _AHT._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _AHT._Rect__int___str__(self) + __swig_destroy__ = _AHT.delete__Rect__int + +# Register _Rect__int in _AHT: +_AHT._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Rect__float_swiginit(self, _AHT.new__Rect__float(*args)) + + def tl(self): + return _AHT._Rect__float_tl(self) + + def br(self): + return _AHT._Rect__float_br(self) + + def size(self): + return _AHT._Rect__float_size(self) + + def area(self): + return _AHT._Rect__float_area(self) + + def contains(self, pt): + return _AHT._Rect__float_contains(self, pt) + x = property(_AHT._Rect__float_x_get, _AHT._Rect__float_x_set) + y = property(_AHT._Rect__float_y_get, _AHT._Rect__float_y_set) + width = property(_AHT._Rect__float_width_get, _AHT._Rect__float_width_set) + height = property(_AHT._Rect__float_height_get, _AHT._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _AHT._Rect__float___str__(self) + __swig_destroy__ = _AHT.delete__Rect__float + +# Register _Rect__float in _AHT: +_AHT._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Rect__double_swiginit(self, _AHT.new__Rect__double(*args)) + + def tl(self): + return _AHT._Rect__double_tl(self) + + def br(self): + return _AHT._Rect__double_br(self) + + def size(self): + return _AHT._Rect__double_size(self) + + def area(self): + return _AHT._Rect__double_area(self) + + def contains(self, pt): + return _AHT._Rect__double_contains(self, pt) + x = property(_AHT._Rect__double_x_get, _AHT._Rect__double_x_set) + y = property(_AHT._Rect__double_y_get, _AHT._Rect__double_y_set) + width = property(_AHT._Rect__double_width_get, _AHT._Rect__double_width_set) + height = property(_AHT._Rect__double_height_get, _AHT._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _AHT._Rect__double___str__(self) + __swig_destroy__ = _AHT.delete__Rect__double + +# Register _Rect__double in _AHT: +_AHT._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Scalar__double_swiginit(self, _AHT.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _AHT._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _AHT._Scalar__double_mul(self, a, scale) + + def conj(self): + return _AHT._Scalar__double_conj(self) + + def isReal(self): + return _AHT._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _AHT._Scalar__double___str__(self) + __swig_destroy__ = _AHT.delete__Scalar__double + +# Register _Scalar__double in _AHT: +_AHT._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _AHT._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Size__int_swiginit(self, _AHT.new__Size__int(*args)) + + def area(self): + return _AHT._Size__int_area(self) + width = property(_AHT._Size__int_width_get, _AHT._Size__int_width_set) + height = property(_AHT._Size__int_height_get, _AHT._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _AHT._Size__int___str__(self) + __swig_destroy__ = _AHT.delete__Size__int + +# Register _Size__int in _AHT: +_AHT._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Size__float_swiginit(self, _AHT.new__Size__float(*args)) + + def area(self): + return _AHT._Size__float_area(self) + width = property(_AHT._Size__float_width_get, _AHT._Size__float_width_set) + height = property(_AHT._Size__float_height_get, _AHT._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _AHT._Size__float___str__(self) + __swig_destroy__ = _AHT.delete__Size__float + +# Register _Size__float in _AHT: +_AHT._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _AHT._Size__double_swiginit(self, _AHT.new__Size__double(*args)) + + def area(self): + return _AHT._Size__double_area(self) + width = property(_AHT._Size__double_width_get, _AHT._Size__double_width_set) + height = property(_AHT._Size__double_height_get, _AHT._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _AHT._Size__double___str__(self) + __swig_destroy__ = _AHT.delete__Size__double + +# Register _Size__double in _AHT: +_AHT._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def AHT(file1, file2, outfile): + return _AHT.AHT(file1, file2, outfile) + + diff --git a/plugins/veg_method/scripts/LHBA.py b/plugins/veg_method/scripts/LHBA.py new file mode 100644 index 0000000..2d65146 --- /dev/null +++ b/plugins/veg_method/scripts/LHBA.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _LHBA +else: + import _LHBA + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _LHBA.CV_VERSION_MAJOR +CV_VERSION_MINOR = _LHBA.CV_VERSION_MINOR +CV_VERSION_REVISION = _LHBA.CV_VERSION_REVISION +CV_VERSION_STATUS = _LHBA.CV_VERSION_STATUS +CV_VERSION = _LHBA.CV_VERSION +CV_MAJOR_VERSION = _LHBA.CV_MAJOR_VERSION +CV_MINOR_VERSION = _LHBA.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _LHBA.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_bool_generic_type + channels = _LHBA.DataType_bool_channels + fmt = _LHBA.DataType_bool_fmt + + def __init__(self): + _LHBA.DataType_bool_swiginit(self, _LHBA.new_DataType_bool()) + __swig_destroy__ = _LHBA.delete_DataType_bool + +# Register DataType_bool in _LHBA: +_LHBA.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_uchar_generic_type + channels = _LHBA.DataType_uchar_channels + fmt = _LHBA.DataType_uchar_fmt + + def __init__(self): + _LHBA.DataType_uchar_swiginit(self, _LHBA.new_DataType_uchar()) + __swig_destroy__ = _LHBA.delete_DataType_uchar + +# Register DataType_uchar in _LHBA: +_LHBA.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_schar_generic_type + channels = _LHBA.DataType_schar_channels + fmt = _LHBA.DataType_schar_fmt + + def __init__(self): + _LHBA.DataType_schar_swiginit(self, _LHBA.new_DataType_schar()) + __swig_destroy__ = _LHBA.delete_DataType_schar + +# Register DataType_schar in _LHBA: +_LHBA.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_char_generic_type + channels = _LHBA.DataType_char_channels + fmt = _LHBA.DataType_char_fmt + + def __init__(self): + _LHBA.DataType_char_swiginit(self, _LHBA.new_DataType_char()) + __swig_destroy__ = _LHBA.delete_DataType_char + +# Register DataType_char in _LHBA: +_LHBA.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_ushort_generic_type + channels = _LHBA.DataType_ushort_channels + fmt = _LHBA.DataType_ushort_fmt + + def __init__(self): + _LHBA.DataType_ushort_swiginit(self, _LHBA.new_DataType_ushort()) + __swig_destroy__ = _LHBA.delete_DataType_ushort + +# Register DataType_ushort in _LHBA: +_LHBA.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_short_generic_type + channels = _LHBA.DataType_short_channels + fmt = _LHBA.DataType_short_fmt + + def __init__(self): + _LHBA.DataType_short_swiginit(self, _LHBA.new_DataType_short()) + __swig_destroy__ = _LHBA.delete_DataType_short + +# Register DataType_short in _LHBA: +_LHBA.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_int_generic_type + channels = _LHBA.DataType_int_channels + fmt = _LHBA.DataType_int_fmt + + def __init__(self): + _LHBA.DataType_int_swiginit(self, _LHBA.new_DataType_int()) + __swig_destroy__ = _LHBA.delete_DataType_int + +# Register DataType_int in _LHBA: +_LHBA.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_float_generic_type + channels = _LHBA.DataType_float_channels + fmt = _LHBA.DataType_float_fmt + + def __init__(self): + _LHBA.DataType_float_swiginit(self, _LHBA.new_DataType_float()) + __swig_destroy__ = _LHBA.delete_DataType_float + +# Register DataType_float in _LHBA: +_LHBA.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA.DataType_double_generic_type + channels = _LHBA.DataType_double_channels + fmt = _LHBA.DataType_double_fmt + + def __init__(self): + _LHBA.DataType_double_swiginit(self, _LHBA.new_DataType_double()) + __swig_destroy__ = _LHBA.delete_DataType_double + +# Register DataType_double in _LHBA: +_LHBA.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA.Range_swiginit(self, _LHBA.new_Range(*args)) + + def size(self): + return _LHBA.Range_size(self) + + def empty(self): + return _LHBA.Range_empty(self) + + @staticmethod + def all(): + return _LHBA.Range_all() + start = property(_LHBA.Range_start_get, _LHBA.Range_start_set) + end = property(_LHBA.Range_end_get, _LHBA.Range_end_set) + __swig_destroy__ = _LHBA.delete_Range + +# Register Range in _LHBA: +_LHBA.Range_swigregister(Range) + +def Range_all(): + return _LHBA.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _LHBA.delete_SwigPyIterator + + def value(self): + return _LHBA.SwigPyIterator_value(self) + + def incr(self, n=1): + return _LHBA.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _LHBA.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _LHBA.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _LHBA.SwigPyIterator_equal(self, x) + + def copy(self): + return _LHBA.SwigPyIterator_copy(self) + + def next(self): + return _LHBA.SwigPyIterator_next(self) + + def __next__(self): + return _LHBA.SwigPyIterator___next__(self) + + def previous(self): + return _LHBA.SwigPyIterator_previous(self) + + def advance(self, n): + return _LHBA.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _LHBA.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _LHBA.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _LHBA.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _LHBA.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _LHBA.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _LHBA.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _LHBA: +_LHBA.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_AddOp_swiginit(self, _LHBA.new_Matx_AddOp()) + __swig_destroy__ = _LHBA.delete_Matx_AddOp + +# Register Matx_AddOp in _LHBA: +_LHBA.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_SubOp_swiginit(self, _LHBA.new_Matx_SubOp()) + __swig_destroy__ = _LHBA.delete_Matx_SubOp + +# Register Matx_SubOp in _LHBA: +_LHBA.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_ScaleOp_swiginit(self, _LHBA.new_Matx_ScaleOp()) + __swig_destroy__ = _LHBA.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _LHBA: +_LHBA.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_MulOp_swiginit(self, _LHBA.new_Matx_MulOp()) + __swig_destroy__ = _LHBA.delete_Matx_MulOp + +# Register Matx_MulOp in _LHBA: +_LHBA.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_DivOp_swiginit(self, _LHBA.new_Matx_DivOp()) + __swig_destroy__ = _LHBA.delete_Matx_DivOp + +# Register Matx_DivOp in _LHBA: +_LHBA.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_MatMulOp_swiginit(self, _LHBA.new_Matx_MatMulOp()) + __swig_destroy__ = _LHBA.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _LHBA: +_LHBA.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA.Matx_TOp_swiginit(self, _LHBA.new_Matx_TOp()) + __swig_destroy__ = _LHBA.delete_Matx_TOp + +# Register Matx_TOp in _LHBA: +_LHBA.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _LHBA.delete_Mat + + def row(self, y): + return _LHBA.Mat_row(self, y) + + def col(self, x): + return _LHBA.Mat_col(self, x) + + def rowRange(self, *args): + return _LHBA.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _LHBA.Mat_colRange(self, *args) + + def diag(self, d=0): + return _LHBA.Mat_diag(self, d) + + def clone(self): + return _LHBA.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _LHBA.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _LHBA.Mat_reshape(self, *args) + + def create(self, *args): + return _LHBA.Mat_create(self, *args) + + def addref(self): + return _LHBA.Mat_addref(self) + + def release(self): + return _LHBA.Mat_release(self) + + def deallocate(self): + return _LHBA.Mat_deallocate(self) + + def copySize(self, m): + return _LHBA.Mat_copySize(self, m) + + def reserve(self, sz): + return _LHBA.Mat_reserve(self, sz) + + def resize(self, *args): + return _LHBA.Mat_resize(self, *args) + + def push_back_(self, elem): + return _LHBA.Mat_push_back_(self, elem) + + def push_back(self, m): + return _LHBA.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _LHBA.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _LHBA.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA.Mat___call__(self, *args) + + def isContinuous(self): + return _LHBA.Mat_isContinuous(self) + + def isSubmatrix(self): + return _LHBA.Mat_isSubmatrix(self) + + def elemSize(self): + return _LHBA.Mat_elemSize(self) + + def elemSize1(self): + return _LHBA.Mat_elemSize1(self) + + def type(self): + return _LHBA.Mat_type(self) + + def depth(self): + return _LHBA.Mat_depth(self) + + def channels(self): + return _LHBA.Mat_channels(self) + + def step1(self, i=0): + return _LHBA.Mat_step1(self, i) + + def empty(self): + return _LHBA.Mat_empty(self) + + def total(self): + return _LHBA.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _LHBA.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _LHBA.Mat_ptr(self, *args) + MAGIC_VAL = _LHBA.Mat_MAGIC_VAL + AUTO_STEP = _LHBA.Mat_AUTO_STEP + CONTINUOUS_FLAG = _LHBA.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _LHBA.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _LHBA.Mat_MAGIC_MASK + TYPE_MASK = _LHBA.Mat_TYPE_MASK + DEPTH_MASK = _LHBA.Mat_DEPTH_MASK + flags = property(_LHBA.Mat_flags_get, _LHBA.Mat_flags_set) + dims = property(_LHBA.Mat_dims_get, _LHBA.Mat_dims_set) + rows = property(_LHBA.Mat_rows_get, _LHBA.Mat_rows_set) + cols = property(_LHBA.Mat_cols_get, _LHBA.Mat_cols_set) + data = property(_LHBA.Mat_data_get, _LHBA.Mat_data_set) + datastart = property(_LHBA.Mat_datastart_get, _LHBA.Mat_datastart_set) + dataend = property(_LHBA.Mat_dataend_get, _LHBA.Mat_dataend_set) + datalimit = property(_LHBA.Mat_datalimit_get, _LHBA.Mat_datalimit_set) + + def __init__(self, *args): + _LHBA.Mat_swiginit(self, _LHBA.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA.Mat___str__(self) + +# Register Mat in _LHBA: +_LHBA.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_uint8_t_swiginit(self, _LHBA.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _LHBA: +_LHBA._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _LHBA.uint8_tArray___bool__(self) + + def __len__(self): + return _LHBA.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _LHBA.uint8_tArray_pop(self) + + def append(self, x): + return _LHBA.uint8_tArray_append(self, x) + + def empty(self): + return _LHBA.uint8_tArray_empty(self) + + def size(self): + return _LHBA.uint8_tArray_size(self) + + def swap(self, v): + return _LHBA.uint8_tArray_swap(self, v) + + def begin(self): + return _LHBA.uint8_tArray_begin(self) + + def end(self): + return _LHBA.uint8_tArray_end(self) + + def rbegin(self): + return _LHBA.uint8_tArray_rbegin(self) + + def rend(self): + return _LHBA.uint8_tArray_rend(self) + + def clear(self): + return _LHBA.uint8_tArray_clear(self) + + def get_allocator(self): + return _LHBA.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _LHBA.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _LHBA.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.uint8_tArray_swiginit(self, _LHBA.new_uint8_tArray(*args)) + + def push_back(self, x): + return _LHBA.uint8_tArray_push_back(self, x) + + def front(self): + return _LHBA.uint8_tArray_front(self) + + def back(self): + return _LHBA.uint8_tArray_back(self) + + def assign(self, n, x): + return _LHBA.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.uint8_tArray_reserve(self, n) + + def capacity(self): + return _LHBA.uint8_tArray_capacity(self) + __swig_destroy__ = _LHBA.delete_uint8_tArray + +# Register uint8_tArray in _LHBA: +_LHBA.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_uint8_t_2_1_rows + cols = _LHBA._Matx_uint8_t_2_1_cols + channels = _LHBA._Matx_uint8_t_2_1_channels + shortdim = _LHBA._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_LHBA._Matx_uint8_t_2_1_val_get, _LHBA._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_uint8_t_2_1_swiginit(self, _LHBA.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _LHBA: +_LHBA._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _LHBA._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _LHBA._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _LHBA._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _LHBA._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _LHBA._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _LHBA._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_uint8_t_2_swiginit(self, _LHBA.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _LHBA: +_LHBA._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _LHBA._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_uint8_t_2_generic_type + channels = _LHBA._DataType_Vec_uint8_t_2_channels + fmt = _LHBA._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_uint8_t_2_swiginit(self, _LHBA.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _LHBA: +_LHBA._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_uint8_t_3_1_rows + cols = _LHBA._Matx_uint8_t_3_1_cols + channels = _LHBA._Matx_uint8_t_3_1_channels + shortdim = _LHBA._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_LHBA._Matx_uint8_t_3_1_val_get, _LHBA._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_uint8_t_3_1_swiginit(self, _LHBA.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _LHBA: +_LHBA._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _LHBA._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _LHBA._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _LHBA._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _LHBA._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _LHBA._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _LHBA._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_uint8_t_3_swiginit(self, _LHBA.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _LHBA: +_LHBA._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _LHBA._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_uint8_t_3_generic_type + channels = _LHBA._DataType_Vec_uint8_t_3_channels + fmt = _LHBA._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_uint8_t_3_swiginit(self, _LHBA.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _LHBA: +_LHBA._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_uint8_t_4_1_rows + cols = _LHBA._Matx_uint8_t_4_1_cols + channels = _LHBA._Matx_uint8_t_4_1_channels + shortdim = _LHBA._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_LHBA._Matx_uint8_t_4_1_val_get, _LHBA._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_uint8_t_4_1_swiginit(self, _LHBA.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _LHBA: +_LHBA._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _LHBA._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _LHBA._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _LHBA._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _LHBA._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _LHBA._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _LHBA._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_uint8_t_4_swiginit(self, _LHBA.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _LHBA: +_LHBA._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _LHBA._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_uint8_t_4_generic_type + channels = _LHBA._DataType_Vec_uint8_t_4_channels + fmt = _LHBA._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_uint8_t_4_swiginit(self, _LHBA.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _LHBA: +_LHBA._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_short_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_short_swiginit(self, _LHBA.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _LHBA: +_LHBA._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.shortArray___nonzero__(self) + + def __bool__(self): + return _LHBA.shortArray___bool__(self) + + def __len__(self): + return _LHBA.shortArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.shortArray___setitem__(self, *args) + + def pop(self): + return _LHBA.shortArray_pop(self) + + def append(self, x): + return _LHBA.shortArray_append(self, x) + + def empty(self): + return _LHBA.shortArray_empty(self) + + def size(self): + return _LHBA.shortArray_size(self) + + def swap(self, v): + return _LHBA.shortArray_swap(self, v) + + def begin(self): + return _LHBA.shortArray_begin(self) + + def end(self): + return _LHBA.shortArray_end(self) + + def rbegin(self): + return _LHBA.shortArray_rbegin(self) + + def rend(self): + return _LHBA.shortArray_rend(self) + + def clear(self): + return _LHBA.shortArray_clear(self) + + def get_allocator(self): + return _LHBA.shortArray_get_allocator(self) + + def pop_back(self): + return _LHBA.shortArray_pop_back(self) + + def erase(self, *args): + return _LHBA.shortArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.shortArray_swiginit(self, _LHBA.new_shortArray(*args)) + + def push_back(self, x): + return _LHBA.shortArray_push_back(self, x) + + def front(self): + return _LHBA.shortArray_front(self) + + def back(self): + return _LHBA.shortArray_back(self) + + def assign(self, n, x): + return _LHBA.shortArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.shortArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.shortArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.shortArray_reserve(self, n) + + def capacity(self): + return _LHBA.shortArray_capacity(self) + __swig_destroy__ = _LHBA.delete_shortArray + +# Register shortArray in _LHBA: +_LHBA.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_short_2_1_rows + cols = _LHBA._Matx_short_2_1_cols + channels = _LHBA._Matx_short_2_1_channels + shortdim = _LHBA._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_short_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_short_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_short_2_1___call__(self, i, j) + val = property(_LHBA._Matx_short_2_1_val_get, _LHBA._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_short_2_1_swiginit(self, _LHBA.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_short_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _LHBA: +_LHBA._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _LHBA._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _LHBA._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _LHBA._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _LHBA._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _LHBA._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _LHBA._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_short_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_short_2_swiginit(self, _LHBA.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_short_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_short_2 + +# Register _Vec_short_2 in _LHBA: +_LHBA._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _LHBA._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_short_2_generic_type + channels = _LHBA._DataType_Vec_short_2_channels + fmt = _LHBA._DataType_Vec_short_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_short_2_swiginit(self, _LHBA.new__DataType_Vec_short_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _LHBA: +_LHBA._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_short_3_1_rows + cols = _LHBA._Matx_short_3_1_cols + channels = _LHBA._Matx_short_3_1_channels + shortdim = _LHBA._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_short_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_short_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_short_3_1___call__(self, i, j) + val = property(_LHBA._Matx_short_3_1_val_get, _LHBA._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_short_3_1_swiginit(self, _LHBA.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_short_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _LHBA: +_LHBA._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _LHBA._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _LHBA._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _LHBA._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _LHBA._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _LHBA._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _LHBA._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_short_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_short_3_swiginit(self, _LHBA.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_short_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_short_3 + +# Register _Vec_short_3 in _LHBA: +_LHBA._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _LHBA._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_short_3_generic_type + channels = _LHBA._DataType_Vec_short_3_channels + fmt = _LHBA._DataType_Vec_short_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_short_3_swiginit(self, _LHBA.new__DataType_Vec_short_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _LHBA: +_LHBA._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_short_4_1_rows + cols = _LHBA._Matx_short_4_1_cols + channels = _LHBA._Matx_short_4_1_channels + shortdim = _LHBA._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_short_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_short_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_short_4_1___call__(self, i, j) + val = property(_LHBA._Matx_short_4_1_val_get, _LHBA._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_short_4_1_swiginit(self, _LHBA.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_short_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _LHBA: +_LHBA._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _LHBA._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _LHBA._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _LHBA._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _LHBA._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _LHBA._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _LHBA._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_short_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_short_4_swiginit(self, _LHBA.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_short_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_short_4 + +# Register _Vec_short_4 in _LHBA: +_LHBA._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _LHBA._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_short_4_generic_type + channels = _LHBA._DataType_Vec_short_4_channels + fmt = _LHBA._DataType_Vec_short_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_short_4_swiginit(self, _LHBA.new__DataType_Vec_short_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _LHBA: +_LHBA._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_ushort_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_ushort_swiginit(self, _LHBA.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _LHBA: +_LHBA._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.ushortArray___nonzero__(self) + + def __bool__(self): + return _LHBA.ushortArray___bool__(self) + + def __len__(self): + return _LHBA.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.ushortArray___setitem__(self, *args) + + def pop(self): + return _LHBA.ushortArray_pop(self) + + def append(self, x): + return _LHBA.ushortArray_append(self, x) + + def empty(self): + return _LHBA.ushortArray_empty(self) + + def size(self): + return _LHBA.ushortArray_size(self) + + def swap(self, v): + return _LHBA.ushortArray_swap(self, v) + + def begin(self): + return _LHBA.ushortArray_begin(self) + + def end(self): + return _LHBA.ushortArray_end(self) + + def rbegin(self): + return _LHBA.ushortArray_rbegin(self) + + def rend(self): + return _LHBA.ushortArray_rend(self) + + def clear(self): + return _LHBA.ushortArray_clear(self) + + def get_allocator(self): + return _LHBA.ushortArray_get_allocator(self) + + def pop_back(self): + return _LHBA.ushortArray_pop_back(self) + + def erase(self, *args): + return _LHBA.ushortArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.ushortArray_swiginit(self, _LHBA.new_ushortArray(*args)) + + def push_back(self, x): + return _LHBA.ushortArray_push_back(self, x) + + def front(self): + return _LHBA.ushortArray_front(self) + + def back(self): + return _LHBA.ushortArray_back(self) + + def assign(self, n, x): + return _LHBA.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.ushortArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.ushortArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.ushortArray_reserve(self, n) + + def capacity(self): + return _LHBA.ushortArray_capacity(self) + __swig_destroy__ = _LHBA.delete_ushortArray + +# Register ushortArray in _LHBA: +_LHBA.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_ushort_2_1_rows + cols = _LHBA._Matx_ushort_2_1_cols + channels = _LHBA._Matx_ushort_2_1_channels + shortdim = _LHBA._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_ushort_2_1___call__(self, i, j) + val = property(_LHBA._Matx_ushort_2_1_val_get, _LHBA._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_ushort_2_1_swiginit(self, _LHBA.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _LHBA: +_LHBA._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _LHBA._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _LHBA._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _LHBA._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _LHBA._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _LHBA._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _LHBA._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_ushort_2_swiginit(self, _LHBA.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_ushort_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _LHBA: +_LHBA._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _LHBA._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_ushort_2_generic_type + channels = _LHBA._DataType_Vec_ushort_2_channels + fmt = _LHBA._DataType_Vec_ushort_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_ushort_2_swiginit(self, _LHBA.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _LHBA: +_LHBA._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_ushort_3_1_rows + cols = _LHBA._Matx_ushort_3_1_cols + channels = _LHBA._Matx_ushort_3_1_channels + shortdim = _LHBA._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_ushort_3_1___call__(self, i, j) + val = property(_LHBA._Matx_ushort_3_1_val_get, _LHBA._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_ushort_3_1_swiginit(self, _LHBA.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _LHBA: +_LHBA._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _LHBA._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _LHBA._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _LHBA._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _LHBA._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _LHBA._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _LHBA._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_ushort_3_swiginit(self, _LHBA.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_ushort_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _LHBA: +_LHBA._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _LHBA._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_ushort_3_generic_type + channels = _LHBA._DataType_Vec_ushort_3_channels + fmt = _LHBA._DataType_Vec_ushort_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_ushort_3_swiginit(self, _LHBA.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _LHBA: +_LHBA._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_ushort_4_1_rows + cols = _LHBA._Matx_ushort_4_1_cols + channels = _LHBA._Matx_ushort_4_1_channels + shortdim = _LHBA._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_ushort_4_1___call__(self, i, j) + val = property(_LHBA._Matx_ushort_4_1_val_get, _LHBA._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_ushort_4_1_swiginit(self, _LHBA.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _LHBA: +_LHBA._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _LHBA._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _LHBA._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _LHBA._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _LHBA._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _LHBA._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _LHBA._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_ushort_4_swiginit(self, _LHBA.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_ushort_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _LHBA: +_LHBA._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _LHBA._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_ushort_4_generic_type + channels = _LHBA._DataType_Vec_ushort_4_channels + fmt = _LHBA._DataType_Vec_ushort_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_ushort_4_swiginit(self, _LHBA.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _LHBA: +_LHBA._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_int_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_int_swiginit(self, _LHBA.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _LHBA: +_LHBA._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.intArray___nonzero__(self) + + def __bool__(self): + return _LHBA.intArray___bool__(self) + + def __len__(self): + return _LHBA.intArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.intArray___setitem__(self, *args) + + def pop(self): + return _LHBA.intArray_pop(self) + + def append(self, x): + return _LHBA.intArray_append(self, x) + + def empty(self): + return _LHBA.intArray_empty(self) + + def size(self): + return _LHBA.intArray_size(self) + + def swap(self, v): + return _LHBA.intArray_swap(self, v) + + def begin(self): + return _LHBA.intArray_begin(self) + + def end(self): + return _LHBA.intArray_end(self) + + def rbegin(self): + return _LHBA.intArray_rbegin(self) + + def rend(self): + return _LHBA.intArray_rend(self) + + def clear(self): + return _LHBA.intArray_clear(self) + + def get_allocator(self): + return _LHBA.intArray_get_allocator(self) + + def pop_back(self): + return _LHBA.intArray_pop_back(self) + + def erase(self, *args): + return _LHBA.intArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.intArray_swiginit(self, _LHBA.new_intArray(*args)) + + def push_back(self, x): + return _LHBA.intArray_push_back(self, x) + + def front(self): + return _LHBA.intArray_front(self) + + def back(self): + return _LHBA.intArray_back(self) + + def assign(self, n, x): + return _LHBA.intArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.intArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.intArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.intArray_reserve(self, n) + + def capacity(self): + return _LHBA.intArray_capacity(self) + __swig_destroy__ = _LHBA.delete_intArray + +# Register intArray in _LHBA: +_LHBA.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_2_1_rows + cols = _LHBA._Matx_int_2_1_cols + channels = _LHBA._Matx_int_2_1_channels + shortdim = _LHBA._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_2_1___call__(self, i, j) + val = property(_LHBA._Matx_int_2_1_val_get, _LHBA._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_2_1_swiginit(self, _LHBA.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _LHBA: +_LHBA._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _LHBA._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _LHBA._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _LHBA._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _LHBA._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _LHBA._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _LHBA._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_2_swiginit(self, _LHBA.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_2 + +# Register _Vec_int_2 in _LHBA: +_LHBA._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _LHBA._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_2_generic_type + channels = _LHBA._DataType_Vec_int_2_channels + fmt = _LHBA._DataType_Vec_int_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_2_swiginit(self, _LHBA.new__DataType_Vec_int_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _LHBA: +_LHBA._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_3_1_rows + cols = _LHBA._Matx_int_3_1_cols + channels = _LHBA._Matx_int_3_1_channels + shortdim = _LHBA._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_3_1___call__(self, i, j) + val = property(_LHBA._Matx_int_3_1_val_get, _LHBA._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_3_1_swiginit(self, _LHBA.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _LHBA: +_LHBA._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _LHBA._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _LHBA._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _LHBA._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _LHBA._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _LHBA._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _LHBA._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_3_swiginit(self, _LHBA.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_3 + +# Register _Vec_int_3 in _LHBA: +_LHBA._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _LHBA._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_3_generic_type + channels = _LHBA._DataType_Vec_int_3_channels + fmt = _LHBA._DataType_Vec_int_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_3_swiginit(self, _LHBA.new__DataType_Vec_int_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _LHBA: +_LHBA._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_4_1_rows + cols = _LHBA._Matx_int_4_1_cols + channels = _LHBA._Matx_int_4_1_channels + shortdim = _LHBA._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_4_1___call__(self, i, j) + val = property(_LHBA._Matx_int_4_1_val_get, _LHBA._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_4_1_swiginit(self, _LHBA.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _LHBA: +_LHBA._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _LHBA._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _LHBA._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _LHBA._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _LHBA._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _LHBA._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _LHBA._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_4_swiginit(self, _LHBA.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_4 + +# Register _Vec_int_4 in _LHBA: +_LHBA._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _LHBA._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_4_generic_type + channels = _LHBA._DataType_Vec_int_4_channels + fmt = _LHBA._DataType_Vec_int_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_4_swiginit(self, _LHBA.new__DataType_Vec_int_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _LHBA: +_LHBA._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_6_1_rows + cols = _LHBA._Matx_int_6_1_cols + channels = _LHBA._Matx_int_6_1_channels + shortdim = _LHBA._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_6_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_6_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_6_1___call__(self, i, j) + val = property(_LHBA._Matx_int_6_1_val_get, _LHBA._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_6_1_swiginit(self, _LHBA.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_6_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _LHBA: +_LHBA._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _LHBA._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _LHBA._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _LHBA._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _LHBA._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _LHBA._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _LHBA._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_6_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_6_swiginit(self, _LHBA.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_6___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_6 + +# Register _Vec_int_6 in _LHBA: +_LHBA._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _LHBA._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_6_generic_type + channels = _LHBA._DataType_Vec_int_6_channels + fmt = _LHBA._DataType_Vec_int_6_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_6_swiginit(self, _LHBA.new__DataType_Vec_int_6()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _LHBA: +_LHBA._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_int_8_1_rows + cols = _LHBA._Matx_int_8_1_cols + channels = _LHBA._Matx_int_8_1_channels + shortdim = _LHBA._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_int_8_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_int_8_1_t(self) + + def mul(self, a): + return _LHBA._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_int_8_1___call__(self, i, j) + val = property(_LHBA._Matx_int_8_1_val_get, _LHBA._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_int_8_1_swiginit(self, _LHBA.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_int_8_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _LHBA: +_LHBA._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _LHBA._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _LHBA._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _LHBA._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _LHBA._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _LHBA._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _LHBA._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_int_8_all(alpha) + + def mul(self, v): + return _LHBA._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_int_8_swiginit(self, _LHBA.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_int_8___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_int_8 + +# Register _Vec_int_8 in _LHBA: +_LHBA._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _LHBA._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_int_8_generic_type + channels = _LHBA._DataType_Vec_int_8_channels + fmt = _LHBA._DataType_Vec_int_8_fmt + + def __init__(self): + _LHBA._DataType_Vec_int_8_swiginit(self, _LHBA.new__DataType_Vec_int_8()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _LHBA: +_LHBA._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_float_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_float_swiginit(self, _LHBA.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _LHBA: +_LHBA._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.floatArray___nonzero__(self) + + def __bool__(self): + return _LHBA.floatArray___bool__(self) + + def __len__(self): + return _LHBA.floatArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.floatArray___setitem__(self, *args) + + def pop(self): + return _LHBA.floatArray_pop(self) + + def append(self, x): + return _LHBA.floatArray_append(self, x) + + def empty(self): + return _LHBA.floatArray_empty(self) + + def size(self): + return _LHBA.floatArray_size(self) + + def swap(self, v): + return _LHBA.floatArray_swap(self, v) + + def begin(self): + return _LHBA.floatArray_begin(self) + + def end(self): + return _LHBA.floatArray_end(self) + + def rbegin(self): + return _LHBA.floatArray_rbegin(self) + + def rend(self): + return _LHBA.floatArray_rend(self) + + def clear(self): + return _LHBA.floatArray_clear(self) + + def get_allocator(self): + return _LHBA.floatArray_get_allocator(self) + + def pop_back(self): + return _LHBA.floatArray_pop_back(self) + + def erase(self, *args): + return _LHBA.floatArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.floatArray_swiginit(self, _LHBA.new_floatArray(*args)) + + def push_back(self, x): + return _LHBA.floatArray_push_back(self, x) + + def front(self): + return _LHBA.floatArray_front(self) + + def back(self): + return _LHBA.floatArray_back(self) + + def assign(self, n, x): + return _LHBA.floatArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.floatArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.floatArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.floatArray_reserve(self, n) + + def capacity(self): + return _LHBA.floatArray_capacity(self) + __swig_destroy__ = _LHBA.delete_floatArray + +# Register floatArray in _LHBA: +_LHBA.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_2_1_rows + cols = _LHBA._Matx_float_2_1_cols + channels = _LHBA._Matx_float_2_1_channels + shortdim = _LHBA._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_2_1___call__(self, i, j) + val = property(_LHBA._Matx_float_2_1_val_get, _LHBA._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_2_1_swiginit(self, _LHBA.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _LHBA: +_LHBA._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _LHBA._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _LHBA._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _LHBA._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _LHBA._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _LHBA._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _LHBA._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_float_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_float_2_swiginit(self, _LHBA.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_float_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_float_2 + +# Register _Vec_float_2 in _LHBA: +_LHBA._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _LHBA._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_float_2_generic_type + channels = _LHBA._DataType_Vec_float_2_channels + fmt = _LHBA._DataType_Vec_float_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_float_2_swiginit(self, _LHBA.new__DataType_Vec_float_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _LHBA: +_LHBA._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_3_1_rows + cols = _LHBA._Matx_float_3_1_cols + channels = _LHBA._Matx_float_3_1_channels + shortdim = _LHBA._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_3_1___call__(self, i, j) + val = property(_LHBA._Matx_float_3_1_val_get, _LHBA._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_3_1_swiginit(self, _LHBA.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _LHBA: +_LHBA._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _LHBA._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _LHBA._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _LHBA._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _LHBA._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _LHBA._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _LHBA._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_float_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_float_3_swiginit(self, _LHBA.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_float_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_float_3 + +# Register _Vec_float_3 in _LHBA: +_LHBA._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _LHBA._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_float_3_generic_type + channels = _LHBA._DataType_Vec_float_3_channels + fmt = _LHBA._DataType_Vec_float_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_float_3_swiginit(self, _LHBA.new__DataType_Vec_float_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _LHBA: +_LHBA._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_4_1_rows + cols = _LHBA._Matx_float_4_1_cols + channels = _LHBA._Matx_float_4_1_channels + shortdim = _LHBA._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_4_1___call__(self, i, j) + val = property(_LHBA._Matx_float_4_1_val_get, _LHBA._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_4_1_swiginit(self, _LHBA.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _LHBA: +_LHBA._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _LHBA._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _LHBA._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _LHBA._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _LHBA._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _LHBA._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _LHBA._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_float_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_float_4_swiginit(self, _LHBA.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_float_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_float_4 + +# Register _Vec_float_4 in _LHBA: +_LHBA._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _LHBA._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_float_4_generic_type + channels = _LHBA._DataType_Vec_float_4_channels + fmt = _LHBA._DataType_Vec_float_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_float_4_swiginit(self, _LHBA.new__DataType_Vec_float_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _LHBA: +_LHBA._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_6_1_rows + cols = _LHBA._Matx_float_6_1_cols + channels = _LHBA._Matx_float_6_1_channels + shortdim = _LHBA._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_6_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_6_1_t(self) + + def mul(self, a): + return _LHBA._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_6_1___call__(self, i, j) + val = property(_LHBA._Matx_float_6_1_val_get, _LHBA._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_6_1_swiginit(self, _LHBA.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_6_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _LHBA: +_LHBA._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _LHBA._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _LHBA._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _LHBA._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _LHBA._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _LHBA._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _LHBA._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_float_6_all(alpha) + + def mul(self, v): + return _LHBA._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_float_6_swiginit(self, _LHBA.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_float_6___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_float_6 + +# Register _Vec_float_6 in _LHBA: +_LHBA._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _LHBA._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_float_6_generic_type + channels = _LHBA._DataType_Vec_float_6_channels + fmt = _LHBA._DataType_Vec_float_6_fmt + + def __init__(self): + _LHBA._DataType_Vec_float_6_swiginit(self, _LHBA.new__DataType_Vec_float_6()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _LHBA: +_LHBA._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_double_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_double_swiginit(self, _LHBA.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _LHBA: +_LHBA._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _LHBA.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _LHBA.doubleArray___nonzero__(self) + + def __bool__(self): + return _LHBA.doubleArray___bool__(self) + + def __len__(self): + return _LHBA.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _LHBA.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _LHBA.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _LHBA.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _LHBA.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _LHBA.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _LHBA.doubleArray___setitem__(self, *args) + + def pop(self): + return _LHBA.doubleArray_pop(self) + + def append(self, x): + return _LHBA.doubleArray_append(self, x) + + def empty(self): + return _LHBA.doubleArray_empty(self) + + def size(self): + return _LHBA.doubleArray_size(self) + + def swap(self, v): + return _LHBA.doubleArray_swap(self, v) + + def begin(self): + return _LHBA.doubleArray_begin(self) + + def end(self): + return _LHBA.doubleArray_end(self) + + def rbegin(self): + return _LHBA.doubleArray_rbegin(self) + + def rend(self): + return _LHBA.doubleArray_rend(self) + + def clear(self): + return _LHBA.doubleArray_clear(self) + + def get_allocator(self): + return _LHBA.doubleArray_get_allocator(self) + + def pop_back(self): + return _LHBA.doubleArray_pop_back(self) + + def erase(self, *args): + return _LHBA.doubleArray_erase(self, *args) + + def __init__(self, *args): + _LHBA.doubleArray_swiginit(self, _LHBA.new_doubleArray(*args)) + + def push_back(self, x): + return _LHBA.doubleArray_push_back(self, x) + + def front(self): + return _LHBA.doubleArray_front(self) + + def back(self): + return _LHBA.doubleArray_back(self) + + def assign(self, n, x): + return _LHBA.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _LHBA.doubleArray_resize(self, *args) + + def insert(self, *args): + return _LHBA.doubleArray_insert(self, *args) + + def reserve(self, n): + return _LHBA.doubleArray_reserve(self, n) + + def capacity(self): + return _LHBA.doubleArray_capacity(self) + __swig_destroy__ = _LHBA.delete_doubleArray + +# Register doubleArray in _LHBA: +_LHBA.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_2_1_rows + cols = _LHBA._Matx_double_2_1_cols + channels = _LHBA._Matx_double_2_1_channels + shortdim = _LHBA._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_2_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_2_1_t(self) + + def mul(self, a): + return _LHBA._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_2_1___call__(self, i, j) + val = property(_LHBA._Matx_double_2_1_val_get, _LHBA._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_2_1_swiginit(self, _LHBA.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_2_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _LHBA: +_LHBA._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _LHBA._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _LHBA._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _LHBA._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _LHBA._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _LHBA._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _LHBA._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_double_2_all(alpha) + + def mul(self, v): + return _LHBA._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_double_2_swiginit(self, _LHBA.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_double_2___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_double_2 + +# Register _Vec_double_2 in _LHBA: +_LHBA._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _LHBA._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_double_2_generic_type + channels = _LHBA._DataType_Vec_double_2_channels + fmt = _LHBA._DataType_Vec_double_2_fmt + + def __init__(self): + _LHBA._DataType_Vec_double_2_swiginit(self, _LHBA.new__DataType_Vec_double_2()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _LHBA: +_LHBA._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_3_1_rows + cols = _LHBA._Matx_double_3_1_cols + channels = _LHBA._Matx_double_3_1_channels + shortdim = _LHBA._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_3_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_3_1_t(self) + + def mul(self, a): + return _LHBA._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_3_1___call__(self, i, j) + val = property(_LHBA._Matx_double_3_1_val_get, _LHBA._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_3_1_swiginit(self, _LHBA.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_3_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _LHBA: +_LHBA._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _LHBA._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _LHBA._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _LHBA._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _LHBA._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _LHBA._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _LHBA._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_double_3_all(alpha) + + def mul(self, v): + return _LHBA._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_double_3_swiginit(self, _LHBA.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_double_3___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_double_3 + +# Register _Vec_double_3 in _LHBA: +_LHBA._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _LHBA._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_double_3_generic_type + channels = _LHBA._DataType_Vec_double_3_channels + fmt = _LHBA._DataType_Vec_double_3_fmt + + def __init__(self): + _LHBA._DataType_Vec_double_3_swiginit(self, _LHBA.new__DataType_Vec_double_3()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _LHBA: +_LHBA._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_4_1_rows + cols = _LHBA._Matx_double_4_1_cols + channels = _LHBA._Matx_double_4_1_channels + shortdim = _LHBA._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_4_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_4_1_t(self) + + def mul(self, a): + return _LHBA._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_4_1___call__(self, i, j) + val = property(_LHBA._Matx_double_4_1_val_get, _LHBA._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_4_1_swiginit(self, _LHBA.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_4_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _LHBA: +_LHBA._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _LHBA._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _LHBA._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _LHBA._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _LHBA._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _LHBA._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _LHBA._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_double_4_all(alpha) + + def mul(self, v): + return _LHBA._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_double_4_swiginit(self, _LHBA.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_double_4___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_double_4 + +# Register _Vec_double_4 in _LHBA: +_LHBA._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _LHBA._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_double_4_generic_type + channels = _LHBA._DataType_Vec_double_4_channels + fmt = _LHBA._DataType_Vec_double_4_fmt + + def __init__(self): + _LHBA._DataType_Vec_double_4_swiginit(self, _LHBA.new__DataType_Vec_double_4()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _LHBA: +_LHBA._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_6_1_rows + cols = _LHBA._Matx_double_6_1_cols + channels = _LHBA._Matx_double_6_1_channels + shortdim = _LHBA._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_6_1_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_6_1_t(self) + + def mul(self, a): + return _LHBA._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_6_1___call__(self, i, j) + val = property(_LHBA._Matx_double_6_1_val_get, _LHBA._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_6_1_swiginit(self, _LHBA.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_6_1___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _LHBA: +_LHBA._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _LHBA._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _LHBA._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _LHBA._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _LHBA._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _LHBA._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _LHBA._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _LHBA._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _LHBA._Vec_double_6_all(alpha) + + def mul(self, v): + return _LHBA._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _LHBA._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Vec_double_6_swiginit(self, _LHBA.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Vec_double_6___str__(self) + __swig_destroy__ = _LHBA.delete__Vec_double_6 + +# Register _Vec_double_6 in _LHBA: +_LHBA._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _LHBA._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _LHBA._DataType_Vec_double_6_generic_type + channels = _LHBA._DataType_Vec_double_6_channels + fmt = _LHBA._DataType_Vec_double_6_fmt + + def __init__(self): + _LHBA._DataType_Vec_double_6_swiginit(self, _LHBA.new__DataType_Vec_double_6()) + __swig_destroy__ = _LHBA.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _LHBA: +_LHBA._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _LHBA._mat__np_array_constructor_swiginit(self, _LHBA.new__mat__np_array_constructor()) + __swig_destroy__ = _LHBA.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _LHBA: +_LHBA._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _LHBA._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _LHBA._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_uchar_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_uchar_swiginit(self, _LHBA.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _LHBA: +_LHBA._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__uchar_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__uchar_cross(self, m) + + def row(self, y): + return _LHBA._Mat__uchar_row(self, y) + + def col(self, x): + return _LHBA._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__uchar_diag(self, d) + + def clone(self): + return _LHBA._Mat__uchar_clone(self) + + def elemSize(self): + return _LHBA._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__uchar_elemSize1(self) + + def type(self): + return _LHBA._Mat__uchar_type(self) + + def depth(self): + return _LHBA._Mat__uchar_depth(self) + + def channels(self): + return _LHBA._Mat__uchar_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__uchar_swiginit(self, _LHBA.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__uchar___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__uchar + +# Register _Mat__uchar in _LHBA: +_LHBA._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2b_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2b_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2b_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2b_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2b_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2b_type(self) + + def depth(self): + return _LHBA._Mat__Vec2b_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2b_swiginit(self, _LHBA.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2b___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _LHBA: +_LHBA._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3b_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3b_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3b_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3b_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3b_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3b_type(self) + + def depth(self): + return _LHBA._Mat__Vec3b_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3b_swiginit(self, _LHBA.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3b___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _LHBA: +_LHBA._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4b_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4b_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4b_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4b_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4b_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4b_type(self) + + def depth(self): + return _LHBA._Mat__Vec4b_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4b_swiginit(self, _LHBA.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4b___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _LHBA: +_LHBA._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__short_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__short_cross(self, m) + + def row(self, y): + return _LHBA._Mat__short_row(self, y) + + def col(self, x): + return _LHBA._Mat__short_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__short_diag(self, d) + + def clone(self): + return _LHBA._Mat__short_clone(self) + + def elemSize(self): + return _LHBA._Mat__short_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__short_elemSize1(self) + + def type(self): + return _LHBA._Mat__short_type(self) + + def depth(self): + return _LHBA._Mat__short_depth(self) + + def channels(self): + return _LHBA._Mat__short_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__short___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__short_swiginit(self, _LHBA.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__short___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__short + +# Register _Mat__short in _LHBA: +_LHBA._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2s_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2s_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2s_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2s_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2s_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2s_type(self) + + def depth(self): + return _LHBA._Mat__Vec2s_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2s_swiginit(self, _LHBA.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2s___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _LHBA: +_LHBA._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3s_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3s_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3s_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3s_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3s_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3s_type(self) + + def depth(self): + return _LHBA._Mat__Vec3s_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3s_swiginit(self, _LHBA.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3s___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _LHBA: +_LHBA._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4s_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4s_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4s_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4s_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4s_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4s_type(self) + + def depth(self): + return _LHBA._Mat__Vec4s_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4s_swiginit(self, _LHBA.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4s___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _LHBA: +_LHBA._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__ushort_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__ushort_cross(self, m) + + def row(self, y): + return _LHBA._Mat__ushort_row(self, y) + + def col(self, x): + return _LHBA._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__ushort_diag(self, d) + + def clone(self): + return _LHBA._Mat__ushort_clone(self) + + def elemSize(self): + return _LHBA._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__ushort_elemSize1(self) + + def type(self): + return _LHBA._Mat__ushort_type(self) + + def depth(self): + return _LHBA._Mat__ushort_depth(self) + + def channels(self): + return _LHBA._Mat__ushort_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__ushort_swiginit(self, _LHBA.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__ushort___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__ushort + +# Register _Mat__ushort in _LHBA: +_LHBA._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2w_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2w_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2w_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2w_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2w_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2w_type(self) + + def depth(self): + return _LHBA._Mat__Vec2w_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2w_swiginit(self, _LHBA.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2w___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _LHBA: +_LHBA._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3w_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3w_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3w_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3w_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3w_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3w_type(self) + + def depth(self): + return _LHBA._Mat__Vec3w_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3w_swiginit(self, _LHBA.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3w___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _LHBA: +_LHBA._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4w_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4w_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4w_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4w_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4w_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4w_type(self) + + def depth(self): + return _LHBA._Mat__Vec4w_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4w_swiginit(self, _LHBA.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4w___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _LHBA: +_LHBA._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__int_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__int_cross(self, m) + + def row(self, y): + return _LHBA._Mat__int_row(self, y) + + def col(self, x): + return _LHBA._Mat__int_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__int_diag(self, d) + + def clone(self): + return _LHBA._Mat__int_clone(self) + + def elemSize(self): + return _LHBA._Mat__int_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__int_elemSize1(self) + + def type(self): + return _LHBA._Mat__int_type(self) + + def depth(self): + return _LHBA._Mat__int_depth(self) + + def channels(self): + return _LHBA._Mat__int_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__int___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__int_swiginit(self, _LHBA.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__int___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__int + +# Register _Mat__int in _LHBA: +_LHBA._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2i_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2i_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2i_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2i_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2i_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2i_type(self) + + def depth(self): + return _LHBA._Mat__Vec2i_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2i_swiginit(self, _LHBA.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2i___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _LHBA: +_LHBA._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3i_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3i_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3i_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3i_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3i_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3i_type(self) + + def depth(self): + return _LHBA._Mat__Vec3i_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3i_swiginit(self, _LHBA.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3i___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _LHBA: +_LHBA._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4i_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4i_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4i_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4i_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4i_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4i_type(self) + + def depth(self): + return _LHBA._Mat__Vec4i_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4i_swiginit(self, _LHBA.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4i___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _LHBA: +_LHBA._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__float_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__float_cross(self, m) + + def row(self, y): + return _LHBA._Mat__float_row(self, y) + + def col(self, x): + return _LHBA._Mat__float_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__float_diag(self, d) + + def clone(self): + return _LHBA._Mat__float_clone(self) + + def elemSize(self): + return _LHBA._Mat__float_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__float_elemSize1(self) + + def type(self): + return _LHBA._Mat__float_type(self) + + def depth(self): + return _LHBA._Mat__float_depth(self) + + def channels(self): + return _LHBA._Mat__float_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__float___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__float_swiginit(self, _LHBA.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__float___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__float + +# Register _Mat__float in _LHBA: +_LHBA._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2f_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2f_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2f_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2f_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2f_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2f_type(self) + + def depth(self): + return _LHBA._Mat__Vec2f_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2f_swiginit(self, _LHBA.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2f___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _LHBA: +_LHBA._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3f_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3f_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3f_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3f_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3f_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3f_type(self) + + def depth(self): + return _LHBA._Mat__Vec3f_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3f_swiginit(self, _LHBA.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3f___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _LHBA: +_LHBA._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4f_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4f_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4f_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4f_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4f_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4f_type(self) + + def depth(self): + return _LHBA._Mat__Vec4f_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4f_swiginit(self, _LHBA.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4f___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _LHBA: +_LHBA._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__double_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__double_cross(self, m) + + def row(self, y): + return _LHBA._Mat__double_row(self, y) + + def col(self, x): + return _LHBA._Mat__double_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__double_diag(self, d) + + def clone(self): + return _LHBA._Mat__double_clone(self) + + def elemSize(self): + return _LHBA._Mat__double_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__double_elemSize1(self) + + def type(self): + return _LHBA._Mat__double_type(self) + + def depth(self): + return _LHBA._Mat__double_depth(self) + + def channels(self): + return _LHBA._Mat__double_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__double___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__double_swiginit(self, _LHBA.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__double___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__double + +# Register _Mat__double in _LHBA: +_LHBA._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec2d_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _LHBA: +_LHBA._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec2d_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec2d_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec2d_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec2d_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec2d_type(self) + + def depth(self): + return _LHBA._Mat__Vec2d_depth(self) + + def channels(self): + return _LHBA._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec2d_swiginit(self, _LHBA.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec2d___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _LHBA: +_LHBA._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec3d_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _LHBA: +_LHBA._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec3d_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec3d_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec3d_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec3d_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec3d_type(self) + + def depth(self): + return _LHBA._Mat__Vec3d_depth(self) + + def channels(self): + return _LHBA._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec3d_swiginit(self, _LHBA.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec3d___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _LHBA: +_LHBA._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _LHBA._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _LHBA._cv_numpy_sizeof_Vec4d_swiginit(self, _LHBA.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _LHBA.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _LHBA: +_LHBA._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _LHBA._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _LHBA._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _LHBA._Mat__Vec4d_row(self, y) + + def col(self, x): + return _LHBA._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _LHBA._Mat__Vec4d_diag(self, d) + + def clone(self): + return _LHBA._Mat__Vec4d_clone(self) + + def elemSize(self): + return _LHBA._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _LHBA._Mat__Vec4d_elemSize1(self) + + def type(self): + return _LHBA._Mat__Vec4d_type(self) + + def depth(self): + return _LHBA._Mat__Vec4d_depth(self) + + def channels(self): + return _LHBA._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _LHBA._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _LHBA._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _LHBA._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _LHBA._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _LHBA._Mat__Vec4d_swiginit(self, _LHBA.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _LHBA._Mat__Vec4d___str__(self) + __swig_destroy__ = _LHBA.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _LHBA: +_LHBA._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_1_2_rows + cols = _LHBA._Matx_float_1_2_cols + channels = _LHBA._Matx_float_1_2_channels + shortdim = _LHBA._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_1_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_1_2_t(self) + + def mul(self, a): + return _LHBA._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_1_2___call__(self, i, j) + val = property(_LHBA._Matx_float_1_2_val_get, _LHBA._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_1_2_swiginit(self, _LHBA.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_1_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _LHBA: +_LHBA._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _LHBA._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _LHBA._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _LHBA._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _LHBA._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _LHBA._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _LHBA._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_1_2_rows + cols = _LHBA._Matx_double_1_2_cols + channels = _LHBA._Matx_double_1_2_channels + shortdim = _LHBA._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_1_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_1_2_t(self) + + def mul(self, a): + return _LHBA._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_1_2___call__(self, i, j) + val = property(_LHBA._Matx_double_1_2_val_get, _LHBA._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_1_2_swiginit(self, _LHBA.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_1_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _LHBA: +_LHBA._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _LHBA._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _LHBA._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _LHBA._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _LHBA._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _LHBA._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _LHBA._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_1_3_rows + cols = _LHBA._Matx_float_1_3_cols + channels = _LHBA._Matx_float_1_3_channels + shortdim = _LHBA._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_1_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_1_3_t(self) + + def mul(self, a): + return _LHBA._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_1_3___call__(self, i, j) + val = property(_LHBA._Matx_float_1_3_val_get, _LHBA._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_1_3_swiginit(self, _LHBA.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_1_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _LHBA: +_LHBA._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _LHBA._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _LHBA._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _LHBA._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _LHBA._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _LHBA._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _LHBA._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_1_3_rows + cols = _LHBA._Matx_double_1_3_cols + channels = _LHBA._Matx_double_1_3_channels + shortdim = _LHBA._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_1_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_1_3_t(self) + + def mul(self, a): + return _LHBA._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_1_3___call__(self, i, j) + val = property(_LHBA._Matx_double_1_3_val_get, _LHBA._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_1_3_swiginit(self, _LHBA.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_1_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _LHBA: +_LHBA._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _LHBA._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _LHBA._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _LHBA._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _LHBA._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _LHBA._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _LHBA._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_1_4_rows + cols = _LHBA._Matx_float_1_4_cols + channels = _LHBA._Matx_float_1_4_channels + shortdim = _LHBA._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_1_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_1_4_t(self) + + def mul(self, a): + return _LHBA._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_1_4___call__(self, i, j) + val = property(_LHBA._Matx_float_1_4_val_get, _LHBA._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_1_4_swiginit(self, _LHBA.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_1_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _LHBA: +_LHBA._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _LHBA._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _LHBA._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _LHBA._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _LHBA._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _LHBA._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _LHBA._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_1_4_rows + cols = _LHBA._Matx_double_1_4_cols + channels = _LHBA._Matx_double_1_4_channels + shortdim = _LHBA._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_1_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_1_4_t(self) + + def mul(self, a): + return _LHBA._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_1_4___call__(self, i, j) + val = property(_LHBA._Matx_double_1_4_val_get, _LHBA._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_1_4_swiginit(self, _LHBA.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_1_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _LHBA: +_LHBA._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _LHBA._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _LHBA._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _LHBA._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _LHBA._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _LHBA._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _LHBA._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_1_6_rows + cols = _LHBA._Matx_float_1_6_cols + channels = _LHBA._Matx_float_1_6_channels + shortdim = _LHBA._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_1_6_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_1_6_t(self) + + def mul(self, a): + return _LHBA._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_1_6___call__(self, i, j) + val = property(_LHBA._Matx_float_1_6_val_get, _LHBA._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_1_6_swiginit(self, _LHBA.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_1_6___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _LHBA: +_LHBA._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _LHBA._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _LHBA._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _LHBA._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _LHBA._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _LHBA._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _LHBA._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_1_6_rows + cols = _LHBA._Matx_double_1_6_cols + channels = _LHBA._Matx_double_1_6_channels + shortdim = _LHBA._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_1_6_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_1_6_t(self) + + def mul(self, a): + return _LHBA._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_1_6___call__(self, i, j) + val = property(_LHBA._Matx_double_1_6_val_get, _LHBA._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_1_6_swiginit(self, _LHBA.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_1_6___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _LHBA: +_LHBA._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _LHBA._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _LHBA._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _LHBA._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _LHBA._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _LHBA._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _LHBA._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_2_2_rows + cols = _LHBA._Matx_float_2_2_cols + channels = _LHBA._Matx_float_2_2_channels + shortdim = _LHBA._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_2_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_2_2_t(self) + + def mul(self, a): + return _LHBA._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_2_2___call__(self, i, j) + val = property(_LHBA._Matx_float_2_2_val_get, _LHBA._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_2_2_swiginit(self, _LHBA.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_2_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _LHBA: +_LHBA._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _LHBA._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _LHBA._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _LHBA._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _LHBA._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _LHBA._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _LHBA._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_2_2_rows + cols = _LHBA._Matx_double_2_2_cols + channels = _LHBA._Matx_double_2_2_channels + shortdim = _LHBA._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_2_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_2_2_t(self) + + def mul(self, a): + return _LHBA._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_2_2___call__(self, i, j) + val = property(_LHBA._Matx_double_2_2_val_get, _LHBA._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_2_2_swiginit(self, _LHBA.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_2_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _LHBA: +_LHBA._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _LHBA._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _LHBA._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _LHBA._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _LHBA._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _LHBA._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _LHBA._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_2_3_rows + cols = _LHBA._Matx_float_2_3_cols + channels = _LHBA._Matx_float_2_3_channels + shortdim = _LHBA._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_2_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_2_3_t(self) + + def mul(self, a): + return _LHBA._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_2_3___call__(self, i, j) + val = property(_LHBA._Matx_float_2_3_val_get, _LHBA._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_2_3_swiginit(self, _LHBA.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_2_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _LHBA: +_LHBA._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _LHBA._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _LHBA._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _LHBA._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _LHBA._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _LHBA._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _LHBA._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_2_3_rows + cols = _LHBA._Matx_double_2_3_cols + channels = _LHBA._Matx_double_2_3_channels + shortdim = _LHBA._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_2_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_2_3_t(self) + + def mul(self, a): + return _LHBA._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_2_3___call__(self, i, j) + val = property(_LHBA._Matx_double_2_3_val_get, _LHBA._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_2_3_swiginit(self, _LHBA.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_2_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _LHBA: +_LHBA._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _LHBA._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _LHBA._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _LHBA._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _LHBA._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _LHBA._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _LHBA._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_3_2_rows + cols = _LHBA._Matx_float_3_2_cols + channels = _LHBA._Matx_float_3_2_channels + shortdim = _LHBA._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_3_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_3_2_t(self) + + def mul(self, a): + return _LHBA._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_3_2___call__(self, i, j) + val = property(_LHBA._Matx_float_3_2_val_get, _LHBA._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_3_2_swiginit(self, _LHBA.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_3_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _LHBA: +_LHBA._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _LHBA._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _LHBA._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _LHBA._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _LHBA._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _LHBA._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _LHBA._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_3_2_rows + cols = _LHBA._Matx_double_3_2_cols + channels = _LHBA._Matx_double_3_2_channels + shortdim = _LHBA._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_3_2_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_3_2_t(self) + + def mul(self, a): + return _LHBA._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_3_2___call__(self, i, j) + val = property(_LHBA._Matx_double_3_2_val_get, _LHBA._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_3_2_swiginit(self, _LHBA.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_3_2___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _LHBA: +_LHBA._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _LHBA._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _LHBA._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _LHBA._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _LHBA._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _LHBA._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _LHBA._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_3_3_rows + cols = _LHBA._Matx_float_3_3_cols + channels = _LHBA._Matx_float_3_3_channels + shortdim = _LHBA._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_3_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_3_3_t(self) + + def mul(self, a): + return _LHBA._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_3_3___call__(self, i, j) + val = property(_LHBA._Matx_float_3_3_val_get, _LHBA._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_3_3_swiginit(self, _LHBA.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_3_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _LHBA: +_LHBA._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _LHBA._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _LHBA._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _LHBA._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _LHBA._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _LHBA._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _LHBA._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_3_3_rows + cols = _LHBA._Matx_double_3_3_cols + channels = _LHBA._Matx_double_3_3_channels + shortdim = _LHBA._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_3_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_3_3_t(self) + + def mul(self, a): + return _LHBA._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_3_3___call__(self, i, j) + val = property(_LHBA._Matx_double_3_3_val_get, _LHBA._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_3_3_swiginit(self, _LHBA.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_3_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _LHBA: +_LHBA._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _LHBA._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _LHBA._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _LHBA._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _LHBA._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _LHBA._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _LHBA._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_3_4_rows + cols = _LHBA._Matx_float_3_4_cols + channels = _LHBA._Matx_float_3_4_channels + shortdim = _LHBA._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_3_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_3_4_t(self) + + def mul(self, a): + return _LHBA._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_3_4___call__(self, i, j) + val = property(_LHBA._Matx_float_3_4_val_get, _LHBA._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_3_4_swiginit(self, _LHBA.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_3_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _LHBA: +_LHBA._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _LHBA._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _LHBA._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _LHBA._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _LHBA._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _LHBA._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _LHBA._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_3_4_rows + cols = _LHBA._Matx_double_3_4_cols + channels = _LHBA._Matx_double_3_4_channels + shortdim = _LHBA._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_3_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_3_4_t(self) + + def mul(self, a): + return _LHBA._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_3_4___call__(self, i, j) + val = property(_LHBA._Matx_double_3_4_val_get, _LHBA._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_3_4_swiginit(self, _LHBA.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_3_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _LHBA: +_LHBA._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _LHBA._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _LHBA._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _LHBA._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _LHBA._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _LHBA._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _LHBA._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_4_3_rows + cols = _LHBA._Matx_float_4_3_cols + channels = _LHBA._Matx_float_4_3_channels + shortdim = _LHBA._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_4_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_4_3_t(self) + + def mul(self, a): + return _LHBA._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_4_3___call__(self, i, j) + val = property(_LHBA._Matx_float_4_3_val_get, _LHBA._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_4_3_swiginit(self, _LHBA.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_4_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _LHBA: +_LHBA._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _LHBA._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _LHBA._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _LHBA._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _LHBA._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _LHBA._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _LHBA._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_4_3_rows + cols = _LHBA._Matx_double_4_3_cols + channels = _LHBA._Matx_double_4_3_channels + shortdim = _LHBA._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_4_3_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_4_3_t(self) + + def mul(self, a): + return _LHBA._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_4_3___call__(self, i, j) + val = property(_LHBA._Matx_double_4_3_val_get, _LHBA._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_4_3_swiginit(self, _LHBA.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_4_3___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _LHBA: +_LHBA._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _LHBA._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _LHBA._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _LHBA._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _LHBA._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _LHBA._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _LHBA._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_4_4_rows + cols = _LHBA._Matx_float_4_4_cols + channels = _LHBA._Matx_float_4_4_channels + shortdim = _LHBA._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_4_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_4_4_t(self) + + def mul(self, a): + return _LHBA._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_4_4___call__(self, i, j) + val = property(_LHBA._Matx_float_4_4_val_get, _LHBA._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_4_4_swiginit(self, _LHBA.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_4_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _LHBA: +_LHBA._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _LHBA._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _LHBA._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _LHBA._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _LHBA._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _LHBA._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _LHBA._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_4_4_rows + cols = _LHBA._Matx_double_4_4_cols + channels = _LHBA._Matx_double_4_4_channels + shortdim = _LHBA._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_4_4_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_4_4_t(self) + + def mul(self, a): + return _LHBA._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_4_4___call__(self, i, j) + val = property(_LHBA._Matx_double_4_4_val_get, _LHBA._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_4_4_swiginit(self, _LHBA.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_4_4___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _LHBA: +_LHBA._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _LHBA._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _LHBA._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _LHBA._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _LHBA._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _LHBA._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _LHBA._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_float_6_6_rows + cols = _LHBA._Matx_float_6_6_cols + channels = _LHBA._Matx_float_6_6_channels + shortdim = _LHBA._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_float_6_6_ddot(self, v) + + def t(self): + return _LHBA._Matx_float_6_6_t(self) + + def mul(self, a): + return _LHBA._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _LHBA._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_float_6_6___call__(self, i, j) + val = property(_LHBA._Matx_float_6_6_val_get, _LHBA._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_float_6_6_swiginit(self, _LHBA.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_float_6_6___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _LHBA: +_LHBA._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _LHBA._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _LHBA._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _LHBA._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _LHBA._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _LHBA._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _LHBA._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _LHBA._Matx_double_6_6_rows + cols = _LHBA._Matx_double_6_6_cols + channels = _LHBA._Matx_double_6_6_channels + shortdim = _LHBA._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _LHBA._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _LHBA._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _LHBA._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _LHBA._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _LHBA._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _LHBA._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _LHBA._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _LHBA._Matx_double_6_6_ddot(self, v) + + def t(self): + return _LHBA._Matx_double_6_6_t(self) + + def mul(self, a): + return _LHBA._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _LHBA._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _LHBA._Matx_double_6_6___call__(self, i, j) + val = property(_LHBA._Matx_double_6_6_val_get, _LHBA._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _LHBA._Matx_double_6_6_swiginit(self, _LHBA.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _LHBA._Matx_double_6_6___str__(self) + __swig_destroy__ = _LHBA.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _LHBA: +_LHBA._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _LHBA._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _LHBA._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _LHBA._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _LHBA._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _LHBA._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _LHBA._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Point__int_swiginit(self, _LHBA.new__Point__int(*args)) + + def dot(self, pt): + return _LHBA._Point__int_dot(self, pt) + + def ddot(self, pt): + return _LHBA._Point__int_ddot(self, pt) + + def cross(self, pt): + return _LHBA._Point__int_cross(self, pt) + x = property(_LHBA._Point__int_x_get, _LHBA._Point__int_x_set) + y = property(_LHBA._Point__int_y_get, _LHBA._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _LHBA._Point__int___str__(self) + __swig_destroy__ = _LHBA.delete__Point__int + +# Register _Point__int in _LHBA: +_LHBA._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Point__float_swiginit(self, _LHBA.new__Point__float(*args)) + + def dot(self, pt): + return _LHBA._Point__float_dot(self, pt) + + def ddot(self, pt): + return _LHBA._Point__float_ddot(self, pt) + + def cross(self, pt): + return _LHBA._Point__float_cross(self, pt) + x = property(_LHBA._Point__float_x_get, _LHBA._Point__float_x_set) + y = property(_LHBA._Point__float_y_get, _LHBA._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _LHBA._Point__float___str__(self) + __swig_destroy__ = _LHBA.delete__Point__float + +# Register _Point__float in _LHBA: +_LHBA._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Point__double_swiginit(self, _LHBA.new__Point__double(*args)) + + def dot(self, pt): + return _LHBA._Point__double_dot(self, pt) + + def ddot(self, pt): + return _LHBA._Point__double_ddot(self, pt) + + def cross(self, pt): + return _LHBA._Point__double_cross(self, pt) + x = property(_LHBA._Point__double_x_get, _LHBA._Point__double_x_set) + y = property(_LHBA._Point__double_y_get, _LHBA._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _LHBA._Point__double___str__(self) + __swig_destroy__ = _LHBA.delete__Point__double + +# Register _Point__double in _LHBA: +_LHBA._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Rect__int_swiginit(self, _LHBA.new__Rect__int(*args)) + + def tl(self): + return _LHBA._Rect__int_tl(self) + + def br(self): + return _LHBA._Rect__int_br(self) + + def size(self): + return _LHBA._Rect__int_size(self) + + def area(self): + return _LHBA._Rect__int_area(self) + + def contains(self, pt): + return _LHBA._Rect__int_contains(self, pt) + x = property(_LHBA._Rect__int_x_get, _LHBA._Rect__int_x_set) + y = property(_LHBA._Rect__int_y_get, _LHBA._Rect__int_y_set) + width = property(_LHBA._Rect__int_width_get, _LHBA._Rect__int_width_set) + height = property(_LHBA._Rect__int_height_get, _LHBA._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _LHBA._Rect__int___str__(self) + __swig_destroy__ = _LHBA.delete__Rect__int + +# Register _Rect__int in _LHBA: +_LHBA._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Rect__float_swiginit(self, _LHBA.new__Rect__float(*args)) + + def tl(self): + return _LHBA._Rect__float_tl(self) + + def br(self): + return _LHBA._Rect__float_br(self) + + def size(self): + return _LHBA._Rect__float_size(self) + + def area(self): + return _LHBA._Rect__float_area(self) + + def contains(self, pt): + return _LHBA._Rect__float_contains(self, pt) + x = property(_LHBA._Rect__float_x_get, _LHBA._Rect__float_x_set) + y = property(_LHBA._Rect__float_y_get, _LHBA._Rect__float_y_set) + width = property(_LHBA._Rect__float_width_get, _LHBA._Rect__float_width_set) + height = property(_LHBA._Rect__float_height_get, _LHBA._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _LHBA._Rect__float___str__(self) + __swig_destroy__ = _LHBA.delete__Rect__float + +# Register _Rect__float in _LHBA: +_LHBA._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Rect__double_swiginit(self, _LHBA.new__Rect__double(*args)) + + def tl(self): + return _LHBA._Rect__double_tl(self) + + def br(self): + return _LHBA._Rect__double_br(self) + + def size(self): + return _LHBA._Rect__double_size(self) + + def area(self): + return _LHBA._Rect__double_area(self) + + def contains(self, pt): + return _LHBA._Rect__double_contains(self, pt) + x = property(_LHBA._Rect__double_x_get, _LHBA._Rect__double_x_set) + y = property(_LHBA._Rect__double_y_get, _LHBA._Rect__double_y_set) + width = property(_LHBA._Rect__double_width_get, _LHBA._Rect__double_width_set) + height = property(_LHBA._Rect__double_height_get, _LHBA._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _LHBA._Rect__double___str__(self) + __swig_destroy__ = _LHBA.delete__Rect__double + +# Register _Rect__double in _LHBA: +_LHBA._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Scalar__double_swiginit(self, _LHBA.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _LHBA._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _LHBA._Scalar__double_mul(self, a, scale) + + def conj(self): + return _LHBA._Scalar__double_conj(self) + + def isReal(self): + return _LHBA._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _LHBA._Scalar__double___str__(self) + __swig_destroy__ = _LHBA.delete__Scalar__double + +# Register _Scalar__double in _LHBA: +_LHBA._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _LHBA._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Size__int_swiginit(self, _LHBA.new__Size__int(*args)) + + def area(self): + return _LHBA._Size__int_area(self) + width = property(_LHBA._Size__int_width_get, _LHBA._Size__int_width_set) + height = property(_LHBA._Size__int_height_get, _LHBA._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _LHBA._Size__int___str__(self) + __swig_destroy__ = _LHBA.delete__Size__int + +# Register _Size__int in _LHBA: +_LHBA._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Size__float_swiginit(self, _LHBA.new__Size__float(*args)) + + def area(self): + return _LHBA._Size__float_area(self) + width = property(_LHBA._Size__float_width_get, _LHBA._Size__float_width_set) + height = property(_LHBA._Size__float_height_get, _LHBA._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _LHBA._Size__float___str__(self) + __swig_destroy__ = _LHBA.delete__Size__float + +# Register _Size__float in _LHBA: +_LHBA._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _LHBA._Size__double_swiginit(self, _LHBA.new__Size__double(*args)) + + def area(self): + return _LHBA._Size__double_area(self) + width = property(_LHBA._Size__double_width_get, _LHBA._Size__double_width_set) + height = property(_LHBA._Size__double_height_get, _LHBA._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _LHBA._Size__double___str__(self) + __swig_destroy__ = _LHBA.delete__Size__double + +# Register _Size__double in _LHBA: +_LHBA._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def LHBA(file1, file2, outfile): + return _LHBA.LHBA(file1, file2, outfile) + + diff --git a/plugins/veg_method/scripts/OCD.py b/plugins/veg_method/scripts/OCD.py new file mode 100644 index 0000000..22a6883 --- /dev/null +++ b/plugins/veg_method/scripts/OCD.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _OCD +else: + import _OCD + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _OCD.CV_VERSION_MAJOR +CV_VERSION_MINOR = _OCD.CV_VERSION_MINOR +CV_VERSION_REVISION = _OCD.CV_VERSION_REVISION +CV_VERSION_STATUS = _OCD.CV_VERSION_STATUS +CV_VERSION = _OCD.CV_VERSION +CV_MAJOR_VERSION = _OCD.CV_MAJOR_VERSION +CV_MINOR_VERSION = _OCD.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _OCD.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_bool_generic_type + channels = _OCD.DataType_bool_channels + fmt = _OCD.DataType_bool_fmt + + def __init__(self): + _OCD.DataType_bool_swiginit(self, _OCD.new_DataType_bool()) + __swig_destroy__ = _OCD.delete_DataType_bool + +# Register DataType_bool in _OCD: +_OCD.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_uchar_generic_type + channels = _OCD.DataType_uchar_channels + fmt = _OCD.DataType_uchar_fmt + + def __init__(self): + _OCD.DataType_uchar_swiginit(self, _OCD.new_DataType_uchar()) + __swig_destroy__ = _OCD.delete_DataType_uchar + +# Register DataType_uchar in _OCD: +_OCD.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_schar_generic_type + channels = _OCD.DataType_schar_channels + fmt = _OCD.DataType_schar_fmt + + def __init__(self): + _OCD.DataType_schar_swiginit(self, _OCD.new_DataType_schar()) + __swig_destroy__ = _OCD.delete_DataType_schar + +# Register DataType_schar in _OCD: +_OCD.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_char_generic_type + channels = _OCD.DataType_char_channels + fmt = _OCD.DataType_char_fmt + + def __init__(self): + _OCD.DataType_char_swiginit(self, _OCD.new_DataType_char()) + __swig_destroy__ = _OCD.delete_DataType_char + +# Register DataType_char in _OCD: +_OCD.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_ushort_generic_type + channels = _OCD.DataType_ushort_channels + fmt = _OCD.DataType_ushort_fmt + + def __init__(self): + _OCD.DataType_ushort_swiginit(self, _OCD.new_DataType_ushort()) + __swig_destroy__ = _OCD.delete_DataType_ushort + +# Register DataType_ushort in _OCD: +_OCD.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_short_generic_type + channels = _OCD.DataType_short_channels + fmt = _OCD.DataType_short_fmt + + def __init__(self): + _OCD.DataType_short_swiginit(self, _OCD.new_DataType_short()) + __swig_destroy__ = _OCD.delete_DataType_short + +# Register DataType_short in _OCD: +_OCD.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_int_generic_type + channels = _OCD.DataType_int_channels + fmt = _OCD.DataType_int_fmt + + def __init__(self): + _OCD.DataType_int_swiginit(self, _OCD.new_DataType_int()) + __swig_destroy__ = _OCD.delete_DataType_int + +# Register DataType_int in _OCD: +_OCD.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_float_generic_type + channels = _OCD.DataType_float_channels + fmt = _OCD.DataType_float_fmt + + def __init__(self): + _OCD.DataType_float_swiginit(self, _OCD.new_DataType_float()) + __swig_destroy__ = _OCD.delete_DataType_float + +# Register DataType_float in _OCD: +_OCD.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD.DataType_double_generic_type + channels = _OCD.DataType_double_channels + fmt = _OCD.DataType_double_fmt + + def __init__(self): + _OCD.DataType_double_swiginit(self, _OCD.new_DataType_double()) + __swig_destroy__ = _OCD.delete_DataType_double + +# Register DataType_double in _OCD: +_OCD.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD.Range_swiginit(self, _OCD.new_Range(*args)) + + def size(self): + return _OCD.Range_size(self) + + def empty(self): + return _OCD.Range_empty(self) + + @staticmethod + def all(): + return _OCD.Range_all() + start = property(_OCD.Range_start_get, _OCD.Range_start_set) + end = property(_OCD.Range_end_get, _OCD.Range_end_set) + __swig_destroy__ = _OCD.delete_Range + +# Register Range in _OCD: +_OCD.Range_swigregister(Range) + +def Range_all(): + return _OCD.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _OCD.delete_SwigPyIterator + + def value(self): + return _OCD.SwigPyIterator_value(self) + + def incr(self, n=1): + return _OCD.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _OCD.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _OCD.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _OCD.SwigPyIterator_equal(self, x) + + def copy(self): + return _OCD.SwigPyIterator_copy(self) + + def next(self): + return _OCD.SwigPyIterator_next(self) + + def __next__(self): + return _OCD.SwigPyIterator___next__(self) + + def previous(self): + return _OCD.SwigPyIterator_previous(self) + + def advance(self, n): + return _OCD.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _OCD.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _OCD.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _OCD.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _OCD.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _OCD.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _OCD.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _OCD: +_OCD.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_AddOp_swiginit(self, _OCD.new_Matx_AddOp()) + __swig_destroy__ = _OCD.delete_Matx_AddOp + +# Register Matx_AddOp in _OCD: +_OCD.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_SubOp_swiginit(self, _OCD.new_Matx_SubOp()) + __swig_destroy__ = _OCD.delete_Matx_SubOp + +# Register Matx_SubOp in _OCD: +_OCD.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_ScaleOp_swiginit(self, _OCD.new_Matx_ScaleOp()) + __swig_destroy__ = _OCD.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _OCD: +_OCD.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_MulOp_swiginit(self, _OCD.new_Matx_MulOp()) + __swig_destroy__ = _OCD.delete_Matx_MulOp + +# Register Matx_MulOp in _OCD: +_OCD.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_DivOp_swiginit(self, _OCD.new_Matx_DivOp()) + __swig_destroy__ = _OCD.delete_Matx_DivOp + +# Register Matx_DivOp in _OCD: +_OCD.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_MatMulOp_swiginit(self, _OCD.new_Matx_MatMulOp()) + __swig_destroy__ = _OCD.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _OCD: +_OCD.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD.Matx_TOp_swiginit(self, _OCD.new_Matx_TOp()) + __swig_destroy__ = _OCD.delete_Matx_TOp + +# Register Matx_TOp in _OCD: +_OCD.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _OCD.delete_Mat + + def row(self, y): + return _OCD.Mat_row(self, y) + + def col(self, x): + return _OCD.Mat_col(self, x) + + def rowRange(self, *args): + return _OCD.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _OCD.Mat_colRange(self, *args) + + def diag(self, d=0): + return _OCD.Mat_diag(self, d) + + def clone(self): + return _OCD.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _OCD.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _OCD.Mat_reshape(self, *args) + + def create(self, *args): + return _OCD.Mat_create(self, *args) + + def addref(self): + return _OCD.Mat_addref(self) + + def release(self): + return _OCD.Mat_release(self) + + def deallocate(self): + return _OCD.Mat_deallocate(self) + + def copySize(self, m): + return _OCD.Mat_copySize(self, m) + + def reserve(self, sz): + return _OCD.Mat_reserve(self, sz) + + def resize(self, *args): + return _OCD.Mat_resize(self, *args) + + def push_back_(self, elem): + return _OCD.Mat_push_back_(self, elem) + + def push_back(self, m): + return _OCD.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _OCD.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _OCD.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD.Mat___call__(self, *args) + + def isContinuous(self): + return _OCD.Mat_isContinuous(self) + + def isSubmatrix(self): + return _OCD.Mat_isSubmatrix(self) + + def elemSize(self): + return _OCD.Mat_elemSize(self) + + def elemSize1(self): + return _OCD.Mat_elemSize1(self) + + def type(self): + return _OCD.Mat_type(self) + + def depth(self): + return _OCD.Mat_depth(self) + + def channels(self): + return _OCD.Mat_channels(self) + + def step1(self, i=0): + return _OCD.Mat_step1(self, i) + + def empty(self): + return _OCD.Mat_empty(self) + + def total(self): + return _OCD.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _OCD.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _OCD.Mat_ptr(self, *args) + MAGIC_VAL = _OCD.Mat_MAGIC_VAL + AUTO_STEP = _OCD.Mat_AUTO_STEP + CONTINUOUS_FLAG = _OCD.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _OCD.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _OCD.Mat_MAGIC_MASK + TYPE_MASK = _OCD.Mat_TYPE_MASK + DEPTH_MASK = _OCD.Mat_DEPTH_MASK + flags = property(_OCD.Mat_flags_get, _OCD.Mat_flags_set) + dims = property(_OCD.Mat_dims_get, _OCD.Mat_dims_set) + rows = property(_OCD.Mat_rows_get, _OCD.Mat_rows_set) + cols = property(_OCD.Mat_cols_get, _OCD.Mat_cols_set) + data = property(_OCD.Mat_data_get, _OCD.Mat_data_set) + datastart = property(_OCD.Mat_datastart_get, _OCD.Mat_datastart_set) + dataend = property(_OCD.Mat_dataend_get, _OCD.Mat_dataend_set) + datalimit = property(_OCD.Mat_datalimit_get, _OCD.Mat_datalimit_set) + + def __init__(self, *args): + _OCD.Mat_swiginit(self, _OCD.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD.Mat___str__(self) + +# Register Mat in _OCD: +_OCD.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _OCD._cv_numpy_sizeof_uint8_t_swiginit(self, _OCD.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _OCD: +_OCD._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _OCD.uint8_tArray___bool__(self) + + def __len__(self): + return _OCD.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _OCD.uint8_tArray_pop(self) + + def append(self, x): + return _OCD.uint8_tArray_append(self, x) + + def empty(self): + return _OCD.uint8_tArray_empty(self) + + def size(self): + return _OCD.uint8_tArray_size(self) + + def swap(self, v): + return _OCD.uint8_tArray_swap(self, v) + + def begin(self): + return _OCD.uint8_tArray_begin(self) + + def end(self): + return _OCD.uint8_tArray_end(self) + + def rbegin(self): + return _OCD.uint8_tArray_rbegin(self) + + def rend(self): + return _OCD.uint8_tArray_rend(self) + + def clear(self): + return _OCD.uint8_tArray_clear(self) + + def get_allocator(self): + return _OCD.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _OCD.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _OCD.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _OCD.uint8_tArray_swiginit(self, _OCD.new_uint8_tArray(*args)) + + def push_back(self, x): + return _OCD.uint8_tArray_push_back(self, x) + + def front(self): + return _OCD.uint8_tArray_front(self) + + def back(self): + return _OCD.uint8_tArray_back(self) + + def assign(self, n, x): + return _OCD.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _OCD.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _OCD.uint8_tArray_reserve(self, n) + + def capacity(self): + return _OCD.uint8_tArray_capacity(self) + __swig_destroy__ = _OCD.delete_uint8_tArray + +# Register uint8_tArray in _OCD: +_OCD.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_uint8_t_2_1_rows + cols = _OCD._Matx_uint8_t_2_1_cols + channels = _OCD._Matx_uint8_t_2_1_channels + shortdim = _OCD._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_OCD._Matx_uint8_t_2_1_val_get, _OCD._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_uint8_t_2_1_swiginit(self, _OCD.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _OCD: +_OCD._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _OCD._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _OCD._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _OCD._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _OCD._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _OCD._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _OCD._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_uint8_t_2_swiginit(self, _OCD.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _OCD: +_OCD._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _OCD._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_uint8_t_2_generic_type + channels = _OCD._DataType_Vec_uint8_t_2_channels + fmt = _OCD._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _OCD._DataType_Vec_uint8_t_2_swiginit(self, _OCD.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _OCD: +_OCD._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_uint8_t_3_1_rows + cols = _OCD._Matx_uint8_t_3_1_cols + channels = _OCD._Matx_uint8_t_3_1_channels + shortdim = _OCD._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_OCD._Matx_uint8_t_3_1_val_get, _OCD._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_uint8_t_3_1_swiginit(self, _OCD.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _OCD: +_OCD._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _OCD._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _OCD._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _OCD._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _OCD._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _OCD._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _OCD._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_uint8_t_3_swiginit(self, _OCD.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _OCD: +_OCD._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _OCD._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_uint8_t_3_generic_type + channels = _OCD._DataType_Vec_uint8_t_3_channels + fmt = _OCD._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _OCD._DataType_Vec_uint8_t_3_swiginit(self, _OCD.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _OCD: +_OCD._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_uint8_t_4_1_rows + cols = _OCD._Matx_uint8_t_4_1_cols + channels = _OCD._Matx_uint8_t_4_1_channels + shortdim = _OCD._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_OCD._Matx_uint8_t_4_1_val_get, _OCD._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_uint8_t_4_1_swiginit(self, _OCD.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _OCD: +_OCD._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _OCD._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _OCD._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _OCD._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _OCD._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _OCD._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _OCD._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_uint8_t_4_swiginit(self, _OCD.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _OCD: +_OCD._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _OCD._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_uint8_t_4_generic_type + channels = _OCD._DataType_Vec_uint8_t_4_channels + fmt = _OCD._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _OCD._DataType_Vec_uint8_t_4_swiginit(self, _OCD.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _OCD: +_OCD._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_short_value + + def __init__(self): + _OCD._cv_numpy_sizeof_short_swiginit(self, _OCD.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _OCD: +_OCD._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.shortArray___nonzero__(self) + + def __bool__(self): + return _OCD.shortArray___bool__(self) + + def __len__(self): + return _OCD.shortArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.shortArray___setitem__(self, *args) + + def pop(self): + return _OCD.shortArray_pop(self) + + def append(self, x): + return _OCD.shortArray_append(self, x) + + def empty(self): + return _OCD.shortArray_empty(self) + + def size(self): + return _OCD.shortArray_size(self) + + def swap(self, v): + return _OCD.shortArray_swap(self, v) + + def begin(self): + return _OCD.shortArray_begin(self) + + def end(self): + return _OCD.shortArray_end(self) + + def rbegin(self): + return _OCD.shortArray_rbegin(self) + + def rend(self): + return _OCD.shortArray_rend(self) + + def clear(self): + return _OCD.shortArray_clear(self) + + def get_allocator(self): + return _OCD.shortArray_get_allocator(self) + + def pop_back(self): + return _OCD.shortArray_pop_back(self) + + def erase(self, *args): + return _OCD.shortArray_erase(self, *args) + + def __init__(self, *args): + _OCD.shortArray_swiginit(self, _OCD.new_shortArray(*args)) + + def push_back(self, x): + return _OCD.shortArray_push_back(self, x) + + def front(self): + return _OCD.shortArray_front(self) + + def back(self): + return _OCD.shortArray_back(self) + + def assign(self, n, x): + return _OCD.shortArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.shortArray_resize(self, *args) + + def insert(self, *args): + return _OCD.shortArray_insert(self, *args) + + def reserve(self, n): + return _OCD.shortArray_reserve(self, n) + + def capacity(self): + return _OCD.shortArray_capacity(self) + __swig_destroy__ = _OCD.delete_shortArray + +# Register shortArray in _OCD: +_OCD.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_short_2_1_rows + cols = _OCD._Matx_short_2_1_cols + channels = _OCD._Matx_short_2_1_channels + shortdim = _OCD._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_short_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_short_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_short_2_1___call__(self, i, j) + val = property(_OCD._Matx_short_2_1_val_get, _OCD._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_short_2_1_swiginit(self, _OCD.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_short_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _OCD: +_OCD._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _OCD._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _OCD._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _OCD._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _OCD._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _OCD._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _OCD._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_short_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_short_2_swiginit(self, _OCD.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_short_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_short_2 + +# Register _Vec_short_2 in _OCD: +_OCD._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _OCD._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_short_2_generic_type + channels = _OCD._DataType_Vec_short_2_channels + fmt = _OCD._DataType_Vec_short_2_fmt + + def __init__(self): + _OCD._DataType_Vec_short_2_swiginit(self, _OCD.new__DataType_Vec_short_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _OCD: +_OCD._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_short_3_1_rows + cols = _OCD._Matx_short_3_1_cols + channels = _OCD._Matx_short_3_1_channels + shortdim = _OCD._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_short_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_short_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_short_3_1___call__(self, i, j) + val = property(_OCD._Matx_short_3_1_val_get, _OCD._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_short_3_1_swiginit(self, _OCD.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_short_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _OCD: +_OCD._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _OCD._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _OCD._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _OCD._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _OCD._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _OCD._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _OCD._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_short_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_short_3_swiginit(self, _OCD.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_short_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_short_3 + +# Register _Vec_short_3 in _OCD: +_OCD._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _OCD._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_short_3_generic_type + channels = _OCD._DataType_Vec_short_3_channels + fmt = _OCD._DataType_Vec_short_3_fmt + + def __init__(self): + _OCD._DataType_Vec_short_3_swiginit(self, _OCD.new__DataType_Vec_short_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _OCD: +_OCD._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_short_4_1_rows + cols = _OCD._Matx_short_4_1_cols + channels = _OCD._Matx_short_4_1_channels + shortdim = _OCD._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_short_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_short_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_short_4_1___call__(self, i, j) + val = property(_OCD._Matx_short_4_1_val_get, _OCD._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_short_4_1_swiginit(self, _OCD.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_short_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _OCD: +_OCD._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _OCD._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _OCD._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _OCD._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _OCD._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _OCD._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _OCD._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_short_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_short_4_swiginit(self, _OCD.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_short_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_short_4 + +# Register _Vec_short_4 in _OCD: +_OCD._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _OCD._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_short_4_generic_type + channels = _OCD._DataType_Vec_short_4_channels + fmt = _OCD._DataType_Vec_short_4_fmt + + def __init__(self): + _OCD._DataType_Vec_short_4_swiginit(self, _OCD.new__DataType_Vec_short_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _OCD: +_OCD._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_ushort_value + + def __init__(self): + _OCD._cv_numpy_sizeof_ushort_swiginit(self, _OCD.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _OCD: +_OCD._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.ushortArray___nonzero__(self) + + def __bool__(self): + return _OCD.ushortArray___bool__(self) + + def __len__(self): + return _OCD.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.ushortArray___setitem__(self, *args) + + def pop(self): + return _OCD.ushortArray_pop(self) + + def append(self, x): + return _OCD.ushortArray_append(self, x) + + def empty(self): + return _OCD.ushortArray_empty(self) + + def size(self): + return _OCD.ushortArray_size(self) + + def swap(self, v): + return _OCD.ushortArray_swap(self, v) + + def begin(self): + return _OCD.ushortArray_begin(self) + + def end(self): + return _OCD.ushortArray_end(self) + + def rbegin(self): + return _OCD.ushortArray_rbegin(self) + + def rend(self): + return _OCD.ushortArray_rend(self) + + def clear(self): + return _OCD.ushortArray_clear(self) + + def get_allocator(self): + return _OCD.ushortArray_get_allocator(self) + + def pop_back(self): + return _OCD.ushortArray_pop_back(self) + + def erase(self, *args): + return _OCD.ushortArray_erase(self, *args) + + def __init__(self, *args): + _OCD.ushortArray_swiginit(self, _OCD.new_ushortArray(*args)) + + def push_back(self, x): + return _OCD.ushortArray_push_back(self, x) + + def front(self): + return _OCD.ushortArray_front(self) + + def back(self): + return _OCD.ushortArray_back(self) + + def assign(self, n, x): + return _OCD.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.ushortArray_resize(self, *args) + + def insert(self, *args): + return _OCD.ushortArray_insert(self, *args) + + def reserve(self, n): + return _OCD.ushortArray_reserve(self, n) + + def capacity(self): + return _OCD.ushortArray_capacity(self) + __swig_destroy__ = _OCD.delete_ushortArray + +# Register ushortArray in _OCD: +_OCD.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_ushort_2_1_rows + cols = _OCD._Matx_ushort_2_1_cols + channels = _OCD._Matx_ushort_2_1_channels + shortdim = _OCD._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_ushort_2_1___call__(self, i, j) + val = property(_OCD._Matx_ushort_2_1_val_get, _OCD._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_ushort_2_1_swiginit(self, _OCD.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _OCD: +_OCD._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _OCD._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _OCD._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _OCD._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _OCD._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _OCD._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _OCD._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_ushort_2_swiginit(self, _OCD.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_ushort_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _OCD: +_OCD._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _OCD._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_ushort_2_generic_type + channels = _OCD._DataType_Vec_ushort_2_channels + fmt = _OCD._DataType_Vec_ushort_2_fmt + + def __init__(self): + _OCD._DataType_Vec_ushort_2_swiginit(self, _OCD.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _OCD: +_OCD._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_ushort_3_1_rows + cols = _OCD._Matx_ushort_3_1_cols + channels = _OCD._Matx_ushort_3_1_channels + shortdim = _OCD._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_ushort_3_1___call__(self, i, j) + val = property(_OCD._Matx_ushort_3_1_val_get, _OCD._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_ushort_3_1_swiginit(self, _OCD.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _OCD: +_OCD._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _OCD._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _OCD._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _OCD._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _OCD._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _OCD._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _OCD._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_ushort_3_swiginit(self, _OCD.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_ushort_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _OCD: +_OCD._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _OCD._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_ushort_3_generic_type + channels = _OCD._DataType_Vec_ushort_3_channels + fmt = _OCD._DataType_Vec_ushort_3_fmt + + def __init__(self): + _OCD._DataType_Vec_ushort_3_swiginit(self, _OCD.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _OCD: +_OCD._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_ushort_4_1_rows + cols = _OCD._Matx_ushort_4_1_cols + channels = _OCD._Matx_ushort_4_1_channels + shortdim = _OCD._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_ushort_4_1___call__(self, i, j) + val = property(_OCD._Matx_ushort_4_1_val_get, _OCD._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_ushort_4_1_swiginit(self, _OCD.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _OCD: +_OCD._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _OCD._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _OCD._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _OCD._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _OCD._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _OCD._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _OCD._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_ushort_4_swiginit(self, _OCD.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_ushort_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _OCD: +_OCD._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _OCD._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_ushort_4_generic_type + channels = _OCD._DataType_Vec_ushort_4_channels + fmt = _OCD._DataType_Vec_ushort_4_fmt + + def __init__(self): + _OCD._DataType_Vec_ushort_4_swiginit(self, _OCD.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _OCD: +_OCD._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_int_value + + def __init__(self): + _OCD._cv_numpy_sizeof_int_swiginit(self, _OCD.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _OCD: +_OCD._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.intArray___nonzero__(self) + + def __bool__(self): + return _OCD.intArray___bool__(self) + + def __len__(self): + return _OCD.intArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.intArray___setitem__(self, *args) + + def pop(self): + return _OCD.intArray_pop(self) + + def append(self, x): + return _OCD.intArray_append(self, x) + + def empty(self): + return _OCD.intArray_empty(self) + + def size(self): + return _OCD.intArray_size(self) + + def swap(self, v): + return _OCD.intArray_swap(self, v) + + def begin(self): + return _OCD.intArray_begin(self) + + def end(self): + return _OCD.intArray_end(self) + + def rbegin(self): + return _OCD.intArray_rbegin(self) + + def rend(self): + return _OCD.intArray_rend(self) + + def clear(self): + return _OCD.intArray_clear(self) + + def get_allocator(self): + return _OCD.intArray_get_allocator(self) + + def pop_back(self): + return _OCD.intArray_pop_back(self) + + def erase(self, *args): + return _OCD.intArray_erase(self, *args) + + def __init__(self, *args): + _OCD.intArray_swiginit(self, _OCD.new_intArray(*args)) + + def push_back(self, x): + return _OCD.intArray_push_back(self, x) + + def front(self): + return _OCD.intArray_front(self) + + def back(self): + return _OCD.intArray_back(self) + + def assign(self, n, x): + return _OCD.intArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.intArray_resize(self, *args) + + def insert(self, *args): + return _OCD.intArray_insert(self, *args) + + def reserve(self, n): + return _OCD.intArray_reserve(self, n) + + def capacity(self): + return _OCD.intArray_capacity(self) + __swig_destroy__ = _OCD.delete_intArray + +# Register intArray in _OCD: +_OCD.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_2_1_rows + cols = _OCD._Matx_int_2_1_cols + channels = _OCD._Matx_int_2_1_channels + shortdim = _OCD._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_2_1___call__(self, i, j) + val = property(_OCD._Matx_int_2_1_val_get, _OCD._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_2_1_swiginit(self, _OCD.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _OCD: +_OCD._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _OCD._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _OCD._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _OCD._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _OCD._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _OCD._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _OCD._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_2_swiginit(self, _OCD.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_2 + +# Register _Vec_int_2 in _OCD: +_OCD._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _OCD._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_2_generic_type + channels = _OCD._DataType_Vec_int_2_channels + fmt = _OCD._DataType_Vec_int_2_fmt + + def __init__(self): + _OCD._DataType_Vec_int_2_swiginit(self, _OCD.new__DataType_Vec_int_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _OCD: +_OCD._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_3_1_rows + cols = _OCD._Matx_int_3_1_cols + channels = _OCD._Matx_int_3_1_channels + shortdim = _OCD._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_3_1___call__(self, i, j) + val = property(_OCD._Matx_int_3_1_val_get, _OCD._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_3_1_swiginit(self, _OCD.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _OCD: +_OCD._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _OCD._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _OCD._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _OCD._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _OCD._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _OCD._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _OCD._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_3_swiginit(self, _OCD.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_3 + +# Register _Vec_int_3 in _OCD: +_OCD._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _OCD._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_3_generic_type + channels = _OCD._DataType_Vec_int_3_channels + fmt = _OCD._DataType_Vec_int_3_fmt + + def __init__(self): + _OCD._DataType_Vec_int_3_swiginit(self, _OCD.new__DataType_Vec_int_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _OCD: +_OCD._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_4_1_rows + cols = _OCD._Matx_int_4_1_cols + channels = _OCD._Matx_int_4_1_channels + shortdim = _OCD._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_4_1___call__(self, i, j) + val = property(_OCD._Matx_int_4_1_val_get, _OCD._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_4_1_swiginit(self, _OCD.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _OCD: +_OCD._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _OCD._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _OCD._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _OCD._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _OCD._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _OCD._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _OCD._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_4_swiginit(self, _OCD.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_4 + +# Register _Vec_int_4 in _OCD: +_OCD._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _OCD._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_4_generic_type + channels = _OCD._DataType_Vec_int_4_channels + fmt = _OCD._DataType_Vec_int_4_fmt + + def __init__(self): + _OCD._DataType_Vec_int_4_swiginit(self, _OCD.new__DataType_Vec_int_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _OCD: +_OCD._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_6_1_rows + cols = _OCD._Matx_int_6_1_cols + channels = _OCD._Matx_int_6_1_channels + shortdim = _OCD._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_6_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_6_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_6_1___call__(self, i, j) + val = property(_OCD._Matx_int_6_1_val_get, _OCD._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_6_1_swiginit(self, _OCD.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_6_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _OCD: +_OCD._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _OCD._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _OCD._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _OCD._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _OCD._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _OCD._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _OCD._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_6_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_6_swiginit(self, _OCD.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_6___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_6 + +# Register _Vec_int_6 in _OCD: +_OCD._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _OCD._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_6_generic_type + channels = _OCD._DataType_Vec_int_6_channels + fmt = _OCD._DataType_Vec_int_6_fmt + + def __init__(self): + _OCD._DataType_Vec_int_6_swiginit(self, _OCD.new__DataType_Vec_int_6()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _OCD: +_OCD._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_int_8_1_rows + cols = _OCD._Matx_int_8_1_cols + channels = _OCD._Matx_int_8_1_channels + shortdim = _OCD._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_int_8_1_ddot(self, v) + + def t(self): + return _OCD._Matx_int_8_1_t(self) + + def mul(self, a): + return _OCD._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_int_8_1___call__(self, i, j) + val = property(_OCD._Matx_int_8_1_val_get, _OCD._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_int_8_1_swiginit(self, _OCD.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_int_8_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _OCD: +_OCD._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _OCD._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _OCD._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _OCD._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _OCD._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _OCD._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _OCD._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_int_8_all(alpha) + + def mul(self, v): + return _OCD._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_int_8_swiginit(self, _OCD.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_int_8___str__(self) + __swig_destroy__ = _OCD.delete__Vec_int_8 + +# Register _Vec_int_8 in _OCD: +_OCD._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _OCD._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_int_8_generic_type + channels = _OCD._DataType_Vec_int_8_channels + fmt = _OCD._DataType_Vec_int_8_fmt + + def __init__(self): + _OCD._DataType_Vec_int_8_swiginit(self, _OCD.new__DataType_Vec_int_8()) + __swig_destroy__ = _OCD.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _OCD: +_OCD._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_float_value + + def __init__(self): + _OCD._cv_numpy_sizeof_float_swiginit(self, _OCD.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _OCD: +_OCD._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.floatArray___nonzero__(self) + + def __bool__(self): + return _OCD.floatArray___bool__(self) + + def __len__(self): + return _OCD.floatArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.floatArray___setitem__(self, *args) + + def pop(self): + return _OCD.floatArray_pop(self) + + def append(self, x): + return _OCD.floatArray_append(self, x) + + def empty(self): + return _OCD.floatArray_empty(self) + + def size(self): + return _OCD.floatArray_size(self) + + def swap(self, v): + return _OCD.floatArray_swap(self, v) + + def begin(self): + return _OCD.floatArray_begin(self) + + def end(self): + return _OCD.floatArray_end(self) + + def rbegin(self): + return _OCD.floatArray_rbegin(self) + + def rend(self): + return _OCD.floatArray_rend(self) + + def clear(self): + return _OCD.floatArray_clear(self) + + def get_allocator(self): + return _OCD.floatArray_get_allocator(self) + + def pop_back(self): + return _OCD.floatArray_pop_back(self) + + def erase(self, *args): + return _OCD.floatArray_erase(self, *args) + + def __init__(self, *args): + _OCD.floatArray_swiginit(self, _OCD.new_floatArray(*args)) + + def push_back(self, x): + return _OCD.floatArray_push_back(self, x) + + def front(self): + return _OCD.floatArray_front(self) + + def back(self): + return _OCD.floatArray_back(self) + + def assign(self, n, x): + return _OCD.floatArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.floatArray_resize(self, *args) + + def insert(self, *args): + return _OCD.floatArray_insert(self, *args) + + def reserve(self, n): + return _OCD.floatArray_reserve(self, n) + + def capacity(self): + return _OCD.floatArray_capacity(self) + __swig_destroy__ = _OCD.delete_floatArray + +# Register floatArray in _OCD: +_OCD.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_2_1_rows + cols = _OCD._Matx_float_2_1_cols + channels = _OCD._Matx_float_2_1_channels + shortdim = _OCD._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_float_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_2_1___call__(self, i, j) + val = property(_OCD._Matx_float_2_1_val_get, _OCD._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_2_1_swiginit(self, _OCD.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _OCD: +_OCD._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _OCD._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _OCD._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _OCD._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _OCD._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _OCD._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _OCD._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_float_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_float_2_swiginit(self, _OCD.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_float_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_float_2 + +# Register _Vec_float_2 in _OCD: +_OCD._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _OCD._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_float_2_generic_type + channels = _OCD._DataType_Vec_float_2_channels + fmt = _OCD._DataType_Vec_float_2_fmt + + def __init__(self): + _OCD._DataType_Vec_float_2_swiginit(self, _OCD.new__DataType_Vec_float_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _OCD: +_OCD._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_3_1_rows + cols = _OCD._Matx_float_3_1_cols + channels = _OCD._Matx_float_3_1_channels + shortdim = _OCD._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_float_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_3_1___call__(self, i, j) + val = property(_OCD._Matx_float_3_1_val_get, _OCD._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_3_1_swiginit(self, _OCD.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _OCD: +_OCD._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _OCD._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _OCD._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _OCD._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _OCD._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _OCD._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _OCD._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_float_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_float_3_swiginit(self, _OCD.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_float_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_float_3 + +# Register _Vec_float_3 in _OCD: +_OCD._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _OCD._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_float_3_generic_type + channels = _OCD._DataType_Vec_float_3_channels + fmt = _OCD._DataType_Vec_float_3_fmt + + def __init__(self): + _OCD._DataType_Vec_float_3_swiginit(self, _OCD.new__DataType_Vec_float_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _OCD: +_OCD._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_4_1_rows + cols = _OCD._Matx_float_4_1_cols + channels = _OCD._Matx_float_4_1_channels + shortdim = _OCD._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_float_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_4_1___call__(self, i, j) + val = property(_OCD._Matx_float_4_1_val_get, _OCD._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_4_1_swiginit(self, _OCD.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _OCD: +_OCD._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _OCD._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _OCD._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _OCD._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _OCD._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _OCD._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _OCD._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_float_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_float_4_swiginit(self, _OCD.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_float_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_float_4 + +# Register _Vec_float_4 in _OCD: +_OCD._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _OCD._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_float_4_generic_type + channels = _OCD._DataType_Vec_float_4_channels + fmt = _OCD._DataType_Vec_float_4_fmt + + def __init__(self): + _OCD._DataType_Vec_float_4_swiginit(self, _OCD.new__DataType_Vec_float_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _OCD: +_OCD._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_6_1_rows + cols = _OCD._Matx_float_6_1_cols + channels = _OCD._Matx_float_6_1_channels + shortdim = _OCD._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_6_1_ddot(self, v) + + def t(self): + return _OCD._Matx_float_6_1_t(self) + + def mul(self, a): + return _OCD._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_6_1___call__(self, i, j) + val = property(_OCD._Matx_float_6_1_val_get, _OCD._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_6_1_swiginit(self, _OCD.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_6_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _OCD: +_OCD._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _OCD._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _OCD._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _OCD._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _OCD._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _OCD._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _OCD._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_float_6_all(alpha) + + def mul(self, v): + return _OCD._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_float_6_swiginit(self, _OCD.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_float_6___str__(self) + __swig_destroy__ = _OCD.delete__Vec_float_6 + +# Register _Vec_float_6 in _OCD: +_OCD._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _OCD._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_float_6_generic_type + channels = _OCD._DataType_Vec_float_6_channels + fmt = _OCD._DataType_Vec_float_6_fmt + + def __init__(self): + _OCD._DataType_Vec_float_6_swiginit(self, _OCD.new__DataType_Vec_float_6()) + __swig_destroy__ = _OCD.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _OCD: +_OCD._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_double_value + + def __init__(self): + _OCD._cv_numpy_sizeof_double_swiginit(self, _OCD.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _OCD: +_OCD._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _OCD.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _OCD.doubleArray___nonzero__(self) + + def __bool__(self): + return _OCD.doubleArray___bool__(self) + + def __len__(self): + return _OCD.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _OCD.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _OCD.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _OCD.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _OCD.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _OCD.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _OCD.doubleArray___setitem__(self, *args) + + def pop(self): + return _OCD.doubleArray_pop(self) + + def append(self, x): + return _OCD.doubleArray_append(self, x) + + def empty(self): + return _OCD.doubleArray_empty(self) + + def size(self): + return _OCD.doubleArray_size(self) + + def swap(self, v): + return _OCD.doubleArray_swap(self, v) + + def begin(self): + return _OCD.doubleArray_begin(self) + + def end(self): + return _OCD.doubleArray_end(self) + + def rbegin(self): + return _OCD.doubleArray_rbegin(self) + + def rend(self): + return _OCD.doubleArray_rend(self) + + def clear(self): + return _OCD.doubleArray_clear(self) + + def get_allocator(self): + return _OCD.doubleArray_get_allocator(self) + + def pop_back(self): + return _OCD.doubleArray_pop_back(self) + + def erase(self, *args): + return _OCD.doubleArray_erase(self, *args) + + def __init__(self, *args): + _OCD.doubleArray_swiginit(self, _OCD.new_doubleArray(*args)) + + def push_back(self, x): + return _OCD.doubleArray_push_back(self, x) + + def front(self): + return _OCD.doubleArray_front(self) + + def back(self): + return _OCD.doubleArray_back(self) + + def assign(self, n, x): + return _OCD.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _OCD.doubleArray_resize(self, *args) + + def insert(self, *args): + return _OCD.doubleArray_insert(self, *args) + + def reserve(self, n): + return _OCD.doubleArray_reserve(self, n) + + def capacity(self): + return _OCD.doubleArray_capacity(self) + __swig_destroy__ = _OCD.delete_doubleArray + +# Register doubleArray in _OCD: +_OCD.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_2_1_rows + cols = _OCD._Matx_double_2_1_cols + channels = _OCD._Matx_double_2_1_channels + shortdim = _OCD._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_2_1_ddot(self, v) + + def t(self): + return _OCD._Matx_double_2_1_t(self) + + def mul(self, a): + return _OCD._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_2_1___call__(self, i, j) + val = property(_OCD._Matx_double_2_1_val_get, _OCD._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_2_1_swiginit(self, _OCD.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_2_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _OCD: +_OCD._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _OCD._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _OCD._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _OCD._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _OCD._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _OCD._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _OCD._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_double_2_all(alpha) + + def mul(self, v): + return _OCD._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_double_2_swiginit(self, _OCD.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_double_2___str__(self) + __swig_destroy__ = _OCD.delete__Vec_double_2 + +# Register _Vec_double_2 in _OCD: +_OCD._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _OCD._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_double_2_generic_type + channels = _OCD._DataType_Vec_double_2_channels + fmt = _OCD._DataType_Vec_double_2_fmt + + def __init__(self): + _OCD._DataType_Vec_double_2_swiginit(self, _OCD.new__DataType_Vec_double_2()) + __swig_destroy__ = _OCD.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _OCD: +_OCD._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_3_1_rows + cols = _OCD._Matx_double_3_1_cols + channels = _OCD._Matx_double_3_1_channels + shortdim = _OCD._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_3_1_ddot(self, v) + + def t(self): + return _OCD._Matx_double_3_1_t(self) + + def mul(self, a): + return _OCD._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_3_1___call__(self, i, j) + val = property(_OCD._Matx_double_3_1_val_get, _OCD._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_3_1_swiginit(self, _OCD.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_3_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _OCD: +_OCD._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _OCD._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _OCD._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _OCD._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _OCD._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _OCD._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _OCD._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_double_3_all(alpha) + + def mul(self, v): + return _OCD._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_double_3_swiginit(self, _OCD.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_double_3___str__(self) + __swig_destroy__ = _OCD.delete__Vec_double_3 + +# Register _Vec_double_3 in _OCD: +_OCD._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _OCD._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_double_3_generic_type + channels = _OCD._DataType_Vec_double_3_channels + fmt = _OCD._DataType_Vec_double_3_fmt + + def __init__(self): + _OCD._DataType_Vec_double_3_swiginit(self, _OCD.new__DataType_Vec_double_3()) + __swig_destroy__ = _OCD.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _OCD: +_OCD._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_4_1_rows + cols = _OCD._Matx_double_4_1_cols + channels = _OCD._Matx_double_4_1_channels + shortdim = _OCD._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_4_1_ddot(self, v) + + def t(self): + return _OCD._Matx_double_4_1_t(self) + + def mul(self, a): + return _OCD._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_4_1___call__(self, i, j) + val = property(_OCD._Matx_double_4_1_val_get, _OCD._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_4_1_swiginit(self, _OCD.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_4_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _OCD: +_OCD._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _OCD._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _OCD._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _OCD._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _OCD._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _OCD._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _OCD._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_double_4_all(alpha) + + def mul(self, v): + return _OCD._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_double_4_swiginit(self, _OCD.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_double_4___str__(self) + __swig_destroy__ = _OCD.delete__Vec_double_4 + +# Register _Vec_double_4 in _OCD: +_OCD._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _OCD._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_double_4_generic_type + channels = _OCD._DataType_Vec_double_4_channels + fmt = _OCD._DataType_Vec_double_4_fmt + + def __init__(self): + _OCD._DataType_Vec_double_4_swiginit(self, _OCD.new__DataType_Vec_double_4()) + __swig_destroy__ = _OCD.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _OCD: +_OCD._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_6_1_rows + cols = _OCD._Matx_double_6_1_cols + channels = _OCD._Matx_double_6_1_channels + shortdim = _OCD._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_6_1_ddot(self, v) + + def t(self): + return _OCD._Matx_double_6_1_t(self) + + def mul(self, a): + return _OCD._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_6_1___call__(self, i, j) + val = property(_OCD._Matx_double_6_1_val_get, _OCD._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_6_1_swiginit(self, _OCD.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_6_1___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _OCD: +_OCD._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _OCD._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _OCD._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _OCD._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _OCD._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _OCD._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _OCD._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _OCD._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _OCD._Vec_double_6_all(alpha) + + def mul(self, v): + return _OCD._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _OCD._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Vec_double_6_swiginit(self, _OCD.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Vec_double_6___str__(self) + __swig_destroy__ = _OCD.delete__Vec_double_6 + +# Register _Vec_double_6 in _OCD: +_OCD._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _OCD._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _OCD._DataType_Vec_double_6_generic_type + channels = _OCD._DataType_Vec_double_6_channels + fmt = _OCD._DataType_Vec_double_6_fmt + + def __init__(self): + _OCD._DataType_Vec_double_6_swiginit(self, _OCD.new__DataType_Vec_double_6()) + __swig_destroy__ = _OCD.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _OCD: +_OCD._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _OCD._mat__np_array_constructor_swiginit(self, _OCD.new__mat__np_array_constructor()) + __swig_destroy__ = _OCD.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _OCD: +_OCD._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _OCD._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _OCD._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_uchar_value + + def __init__(self): + _OCD._cv_numpy_sizeof_uchar_swiginit(self, _OCD.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _OCD: +_OCD._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__uchar_create(self, *args) + + def cross(self, m): + return _OCD._Mat__uchar_cross(self, m) + + def row(self, y): + return _OCD._Mat__uchar_row(self, y) + + def col(self, x): + return _OCD._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__uchar_diag(self, d) + + def clone(self): + return _OCD._Mat__uchar_clone(self) + + def elemSize(self): + return _OCD._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__uchar_elemSize1(self) + + def type(self): + return _OCD._Mat__uchar_type(self) + + def depth(self): + return _OCD._Mat__uchar_depth(self) + + def channels(self): + return _OCD._Mat__uchar_channels(self) + + def step1(self, i=0): + return _OCD._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__uchar_swiginit(self, _OCD.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__uchar___str__(self) + __swig_destroy__ = _OCD.delete__Mat__uchar + +# Register _Mat__uchar in _OCD: +_OCD._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2b_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _OCD: +_OCD._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2b_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2b_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2b_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2b_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2b_type(self) + + def depth(self): + return _OCD._Mat__Vec2b_depth(self) + + def channels(self): + return _OCD._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2b_swiginit(self, _OCD.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2b___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _OCD: +_OCD._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3b_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _OCD: +_OCD._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3b_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3b_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3b_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3b_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3b_type(self) + + def depth(self): + return _OCD._Mat__Vec3b_depth(self) + + def channels(self): + return _OCD._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3b_swiginit(self, _OCD.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3b___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _OCD: +_OCD._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4b_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _OCD: +_OCD._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4b_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4b_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4b_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4b_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4b_type(self) + + def depth(self): + return _OCD._Mat__Vec4b_depth(self) + + def channels(self): + return _OCD._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4b_swiginit(self, _OCD.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4b___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _OCD: +_OCD._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__short_create(self, *args) + + def cross(self, m): + return _OCD._Mat__short_cross(self, m) + + def row(self, y): + return _OCD._Mat__short_row(self, y) + + def col(self, x): + return _OCD._Mat__short_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__short_diag(self, d) + + def clone(self): + return _OCD._Mat__short_clone(self) + + def elemSize(self): + return _OCD._Mat__short_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__short_elemSize1(self) + + def type(self): + return _OCD._Mat__short_type(self) + + def depth(self): + return _OCD._Mat__short_depth(self) + + def channels(self): + return _OCD._Mat__short_channels(self) + + def step1(self, i=0): + return _OCD._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__short___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__short_swiginit(self, _OCD.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__short___str__(self) + __swig_destroy__ = _OCD.delete__Mat__short + +# Register _Mat__short in _OCD: +_OCD._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2s_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _OCD: +_OCD._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2s_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2s_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2s_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2s_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2s_type(self) + + def depth(self): + return _OCD._Mat__Vec2s_depth(self) + + def channels(self): + return _OCD._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2s_swiginit(self, _OCD.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2s___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _OCD: +_OCD._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3s_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _OCD: +_OCD._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3s_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3s_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3s_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3s_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3s_type(self) + + def depth(self): + return _OCD._Mat__Vec3s_depth(self) + + def channels(self): + return _OCD._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3s_swiginit(self, _OCD.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3s___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _OCD: +_OCD._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4s_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _OCD: +_OCD._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4s_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4s_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4s_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4s_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4s_type(self) + + def depth(self): + return _OCD._Mat__Vec4s_depth(self) + + def channels(self): + return _OCD._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4s_swiginit(self, _OCD.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4s___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _OCD: +_OCD._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__ushort_create(self, *args) + + def cross(self, m): + return _OCD._Mat__ushort_cross(self, m) + + def row(self, y): + return _OCD._Mat__ushort_row(self, y) + + def col(self, x): + return _OCD._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__ushort_diag(self, d) + + def clone(self): + return _OCD._Mat__ushort_clone(self) + + def elemSize(self): + return _OCD._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__ushort_elemSize1(self) + + def type(self): + return _OCD._Mat__ushort_type(self) + + def depth(self): + return _OCD._Mat__ushort_depth(self) + + def channels(self): + return _OCD._Mat__ushort_channels(self) + + def step1(self, i=0): + return _OCD._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__ushort_swiginit(self, _OCD.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__ushort___str__(self) + __swig_destroy__ = _OCD.delete__Mat__ushort + +# Register _Mat__ushort in _OCD: +_OCD._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2w_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _OCD: +_OCD._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2w_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2w_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2w_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2w_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2w_type(self) + + def depth(self): + return _OCD._Mat__Vec2w_depth(self) + + def channels(self): + return _OCD._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2w_swiginit(self, _OCD.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2w___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _OCD: +_OCD._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3w_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _OCD: +_OCD._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3w_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3w_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3w_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3w_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3w_type(self) + + def depth(self): + return _OCD._Mat__Vec3w_depth(self) + + def channels(self): + return _OCD._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3w_swiginit(self, _OCD.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3w___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _OCD: +_OCD._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4w_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _OCD: +_OCD._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4w_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4w_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4w_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4w_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4w_type(self) + + def depth(self): + return _OCD._Mat__Vec4w_depth(self) + + def channels(self): + return _OCD._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4w_swiginit(self, _OCD.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4w___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _OCD: +_OCD._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__int_create(self, *args) + + def cross(self, m): + return _OCD._Mat__int_cross(self, m) + + def row(self, y): + return _OCD._Mat__int_row(self, y) + + def col(self, x): + return _OCD._Mat__int_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__int_diag(self, d) + + def clone(self): + return _OCD._Mat__int_clone(self) + + def elemSize(self): + return _OCD._Mat__int_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__int_elemSize1(self) + + def type(self): + return _OCD._Mat__int_type(self) + + def depth(self): + return _OCD._Mat__int_depth(self) + + def channels(self): + return _OCD._Mat__int_channels(self) + + def step1(self, i=0): + return _OCD._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__int___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__int_swiginit(self, _OCD.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__int___str__(self) + __swig_destroy__ = _OCD.delete__Mat__int + +# Register _Mat__int in _OCD: +_OCD._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2i_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _OCD: +_OCD._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2i_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2i_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2i_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2i_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2i_type(self) + + def depth(self): + return _OCD._Mat__Vec2i_depth(self) + + def channels(self): + return _OCD._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2i_swiginit(self, _OCD.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2i___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _OCD: +_OCD._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3i_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _OCD: +_OCD._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3i_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3i_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3i_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3i_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3i_type(self) + + def depth(self): + return _OCD._Mat__Vec3i_depth(self) + + def channels(self): + return _OCD._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3i_swiginit(self, _OCD.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3i___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _OCD: +_OCD._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4i_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _OCD: +_OCD._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4i_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4i_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4i_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4i_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4i_type(self) + + def depth(self): + return _OCD._Mat__Vec4i_depth(self) + + def channels(self): + return _OCD._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4i_swiginit(self, _OCD.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4i___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _OCD: +_OCD._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__float_create(self, *args) + + def cross(self, m): + return _OCD._Mat__float_cross(self, m) + + def row(self, y): + return _OCD._Mat__float_row(self, y) + + def col(self, x): + return _OCD._Mat__float_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__float_diag(self, d) + + def clone(self): + return _OCD._Mat__float_clone(self) + + def elemSize(self): + return _OCD._Mat__float_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__float_elemSize1(self) + + def type(self): + return _OCD._Mat__float_type(self) + + def depth(self): + return _OCD._Mat__float_depth(self) + + def channels(self): + return _OCD._Mat__float_channels(self) + + def step1(self, i=0): + return _OCD._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__float___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__float_swiginit(self, _OCD.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__float___str__(self) + __swig_destroy__ = _OCD.delete__Mat__float + +# Register _Mat__float in _OCD: +_OCD._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2f_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _OCD: +_OCD._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2f_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2f_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2f_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2f_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2f_type(self) + + def depth(self): + return _OCD._Mat__Vec2f_depth(self) + + def channels(self): + return _OCD._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2f_swiginit(self, _OCD.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2f___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _OCD: +_OCD._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3f_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _OCD: +_OCD._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3f_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3f_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3f_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3f_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3f_type(self) + + def depth(self): + return _OCD._Mat__Vec3f_depth(self) + + def channels(self): + return _OCD._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3f_swiginit(self, _OCD.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3f___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _OCD: +_OCD._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4f_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _OCD: +_OCD._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4f_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4f_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4f_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4f_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4f_type(self) + + def depth(self): + return _OCD._Mat__Vec4f_depth(self) + + def channels(self): + return _OCD._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4f_swiginit(self, _OCD.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4f___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _OCD: +_OCD._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__double_create(self, *args) + + def cross(self, m): + return _OCD._Mat__double_cross(self, m) + + def row(self, y): + return _OCD._Mat__double_row(self, y) + + def col(self, x): + return _OCD._Mat__double_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__double_diag(self, d) + + def clone(self): + return _OCD._Mat__double_clone(self) + + def elemSize(self): + return _OCD._Mat__double_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__double_elemSize1(self) + + def type(self): + return _OCD._Mat__double_type(self) + + def depth(self): + return _OCD._Mat__double_depth(self) + + def channels(self): + return _OCD._Mat__double_channels(self) + + def step1(self, i=0): + return _OCD._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__double___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__double_swiginit(self, _OCD.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__double___str__(self) + __swig_destroy__ = _OCD.delete__Mat__double + +# Register _Mat__double in _OCD: +_OCD._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec2d_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _OCD: +_OCD._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec2d_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec2d_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec2d_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec2d_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec2d_type(self) + + def depth(self): + return _OCD._Mat__Vec2d_depth(self) + + def channels(self): + return _OCD._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec2d_swiginit(self, _OCD.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec2d___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _OCD: +_OCD._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec3d_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _OCD: +_OCD._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec3d_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec3d_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec3d_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec3d_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec3d_type(self) + + def depth(self): + return _OCD._Mat__Vec3d_depth(self) + + def channels(self): + return _OCD._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec3d_swiginit(self, _OCD.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec3d___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _OCD: +_OCD._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _OCD._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _OCD._cv_numpy_sizeof_Vec4d_swiginit(self, _OCD.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _OCD.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _OCD: +_OCD._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _OCD._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _OCD._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _OCD._Mat__Vec4d_row(self, y) + + def col(self, x): + return _OCD._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _OCD._Mat__Vec4d_diag(self, d) + + def clone(self): + return _OCD._Mat__Vec4d_clone(self) + + def elemSize(self): + return _OCD._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _OCD._Mat__Vec4d_elemSize1(self) + + def type(self): + return _OCD._Mat__Vec4d_type(self) + + def depth(self): + return _OCD._Mat__Vec4d_depth(self) + + def channels(self): + return _OCD._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _OCD._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _OCD._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _OCD._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _OCD._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _OCD._Mat__Vec4d_swiginit(self, _OCD.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _OCD._Mat__Vec4d___str__(self) + __swig_destroy__ = _OCD.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _OCD: +_OCD._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_1_2_rows + cols = _OCD._Matx_float_1_2_cols + channels = _OCD._Matx_float_1_2_channels + shortdim = _OCD._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_1_2_ddot(self, v) + + def t(self): + return _OCD._Matx_float_1_2_t(self) + + def mul(self, a): + return _OCD._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_1_2___call__(self, i, j) + val = property(_OCD._Matx_float_1_2_val_get, _OCD._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_1_2_swiginit(self, _OCD.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_1_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _OCD: +_OCD._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _OCD._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _OCD._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _OCD._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _OCD._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _OCD._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _OCD._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_1_2_rows + cols = _OCD._Matx_double_1_2_cols + channels = _OCD._Matx_double_1_2_channels + shortdim = _OCD._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_1_2_ddot(self, v) + + def t(self): + return _OCD._Matx_double_1_2_t(self) + + def mul(self, a): + return _OCD._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_1_2___call__(self, i, j) + val = property(_OCD._Matx_double_1_2_val_get, _OCD._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_1_2_swiginit(self, _OCD.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_1_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _OCD: +_OCD._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _OCD._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _OCD._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _OCD._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _OCD._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _OCD._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _OCD._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_1_3_rows + cols = _OCD._Matx_float_1_3_cols + channels = _OCD._Matx_float_1_3_channels + shortdim = _OCD._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_1_3_ddot(self, v) + + def t(self): + return _OCD._Matx_float_1_3_t(self) + + def mul(self, a): + return _OCD._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_1_3___call__(self, i, j) + val = property(_OCD._Matx_float_1_3_val_get, _OCD._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_1_3_swiginit(self, _OCD.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_1_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _OCD: +_OCD._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _OCD._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _OCD._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _OCD._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _OCD._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _OCD._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _OCD._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_1_3_rows + cols = _OCD._Matx_double_1_3_cols + channels = _OCD._Matx_double_1_3_channels + shortdim = _OCD._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_1_3_ddot(self, v) + + def t(self): + return _OCD._Matx_double_1_3_t(self) + + def mul(self, a): + return _OCD._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_1_3___call__(self, i, j) + val = property(_OCD._Matx_double_1_3_val_get, _OCD._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_1_3_swiginit(self, _OCD.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_1_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _OCD: +_OCD._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _OCD._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _OCD._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _OCD._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _OCD._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _OCD._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _OCD._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_1_4_rows + cols = _OCD._Matx_float_1_4_cols + channels = _OCD._Matx_float_1_4_channels + shortdim = _OCD._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_1_4_ddot(self, v) + + def t(self): + return _OCD._Matx_float_1_4_t(self) + + def mul(self, a): + return _OCD._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_1_4___call__(self, i, j) + val = property(_OCD._Matx_float_1_4_val_get, _OCD._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_1_4_swiginit(self, _OCD.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_1_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _OCD: +_OCD._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _OCD._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _OCD._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _OCD._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _OCD._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _OCD._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _OCD._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_1_4_rows + cols = _OCD._Matx_double_1_4_cols + channels = _OCD._Matx_double_1_4_channels + shortdim = _OCD._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_1_4_ddot(self, v) + + def t(self): + return _OCD._Matx_double_1_4_t(self) + + def mul(self, a): + return _OCD._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_1_4___call__(self, i, j) + val = property(_OCD._Matx_double_1_4_val_get, _OCD._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_1_4_swiginit(self, _OCD.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_1_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _OCD: +_OCD._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _OCD._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _OCD._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _OCD._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _OCD._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _OCD._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _OCD._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_1_6_rows + cols = _OCD._Matx_float_1_6_cols + channels = _OCD._Matx_float_1_6_channels + shortdim = _OCD._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_1_6_ddot(self, v) + + def t(self): + return _OCD._Matx_float_1_6_t(self) + + def mul(self, a): + return _OCD._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_1_6___call__(self, i, j) + val = property(_OCD._Matx_float_1_6_val_get, _OCD._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_1_6_swiginit(self, _OCD.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_1_6___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _OCD: +_OCD._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _OCD._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _OCD._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _OCD._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _OCD._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _OCD._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _OCD._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_1_6_rows + cols = _OCD._Matx_double_1_6_cols + channels = _OCD._Matx_double_1_6_channels + shortdim = _OCD._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_1_6_ddot(self, v) + + def t(self): + return _OCD._Matx_double_1_6_t(self) + + def mul(self, a): + return _OCD._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_1_6___call__(self, i, j) + val = property(_OCD._Matx_double_1_6_val_get, _OCD._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_1_6_swiginit(self, _OCD.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_1_6___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _OCD: +_OCD._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _OCD._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _OCD._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _OCD._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _OCD._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _OCD._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _OCD._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_2_2_rows + cols = _OCD._Matx_float_2_2_cols + channels = _OCD._Matx_float_2_2_channels + shortdim = _OCD._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_2_2_ddot(self, v) + + def t(self): + return _OCD._Matx_float_2_2_t(self) + + def mul(self, a): + return _OCD._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_2_2___call__(self, i, j) + val = property(_OCD._Matx_float_2_2_val_get, _OCD._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_2_2_swiginit(self, _OCD.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_2_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _OCD: +_OCD._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _OCD._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _OCD._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _OCD._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _OCD._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _OCD._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _OCD._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_2_2_rows + cols = _OCD._Matx_double_2_2_cols + channels = _OCD._Matx_double_2_2_channels + shortdim = _OCD._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_2_2_ddot(self, v) + + def t(self): + return _OCD._Matx_double_2_2_t(self) + + def mul(self, a): + return _OCD._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_2_2___call__(self, i, j) + val = property(_OCD._Matx_double_2_2_val_get, _OCD._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_2_2_swiginit(self, _OCD.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_2_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _OCD: +_OCD._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _OCD._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _OCD._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _OCD._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _OCD._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _OCD._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _OCD._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_2_3_rows + cols = _OCD._Matx_float_2_3_cols + channels = _OCD._Matx_float_2_3_channels + shortdim = _OCD._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_2_3_ddot(self, v) + + def t(self): + return _OCD._Matx_float_2_3_t(self) + + def mul(self, a): + return _OCD._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_2_3___call__(self, i, j) + val = property(_OCD._Matx_float_2_3_val_get, _OCD._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_2_3_swiginit(self, _OCD.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_2_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _OCD: +_OCD._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _OCD._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _OCD._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _OCD._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _OCD._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _OCD._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _OCD._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_2_3_rows + cols = _OCD._Matx_double_2_3_cols + channels = _OCD._Matx_double_2_3_channels + shortdim = _OCD._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_2_3_ddot(self, v) + + def t(self): + return _OCD._Matx_double_2_3_t(self) + + def mul(self, a): + return _OCD._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_2_3___call__(self, i, j) + val = property(_OCD._Matx_double_2_3_val_get, _OCD._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_2_3_swiginit(self, _OCD.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_2_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _OCD: +_OCD._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _OCD._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _OCD._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _OCD._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _OCD._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _OCD._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _OCD._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_3_2_rows + cols = _OCD._Matx_float_3_2_cols + channels = _OCD._Matx_float_3_2_channels + shortdim = _OCD._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_3_2_ddot(self, v) + + def t(self): + return _OCD._Matx_float_3_2_t(self) + + def mul(self, a): + return _OCD._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_3_2___call__(self, i, j) + val = property(_OCD._Matx_float_3_2_val_get, _OCD._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_3_2_swiginit(self, _OCD.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_3_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _OCD: +_OCD._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _OCD._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _OCD._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _OCD._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _OCD._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _OCD._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _OCD._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_3_2_rows + cols = _OCD._Matx_double_3_2_cols + channels = _OCD._Matx_double_3_2_channels + shortdim = _OCD._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_3_2_ddot(self, v) + + def t(self): + return _OCD._Matx_double_3_2_t(self) + + def mul(self, a): + return _OCD._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_3_2___call__(self, i, j) + val = property(_OCD._Matx_double_3_2_val_get, _OCD._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_3_2_swiginit(self, _OCD.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_3_2___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _OCD: +_OCD._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _OCD._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _OCD._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _OCD._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _OCD._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _OCD._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _OCD._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_3_3_rows + cols = _OCD._Matx_float_3_3_cols + channels = _OCD._Matx_float_3_3_channels + shortdim = _OCD._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_3_3_ddot(self, v) + + def t(self): + return _OCD._Matx_float_3_3_t(self) + + def mul(self, a): + return _OCD._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_3_3___call__(self, i, j) + val = property(_OCD._Matx_float_3_3_val_get, _OCD._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_3_3_swiginit(self, _OCD.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_3_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _OCD: +_OCD._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _OCD._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _OCD._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _OCD._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _OCD._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _OCD._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _OCD._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_3_3_rows + cols = _OCD._Matx_double_3_3_cols + channels = _OCD._Matx_double_3_3_channels + shortdim = _OCD._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_3_3_ddot(self, v) + + def t(self): + return _OCD._Matx_double_3_3_t(self) + + def mul(self, a): + return _OCD._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_3_3___call__(self, i, j) + val = property(_OCD._Matx_double_3_3_val_get, _OCD._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_3_3_swiginit(self, _OCD.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_3_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _OCD: +_OCD._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _OCD._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _OCD._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _OCD._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _OCD._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _OCD._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _OCD._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_3_4_rows + cols = _OCD._Matx_float_3_4_cols + channels = _OCD._Matx_float_3_4_channels + shortdim = _OCD._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_3_4_ddot(self, v) + + def t(self): + return _OCD._Matx_float_3_4_t(self) + + def mul(self, a): + return _OCD._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_3_4___call__(self, i, j) + val = property(_OCD._Matx_float_3_4_val_get, _OCD._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_3_4_swiginit(self, _OCD.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_3_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _OCD: +_OCD._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _OCD._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _OCD._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _OCD._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _OCD._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _OCD._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _OCD._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_3_4_rows + cols = _OCD._Matx_double_3_4_cols + channels = _OCD._Matx_double_3_4_channels + shortdim = _OCD._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_3_4_ddot(self, v) + + def t(self): + return _OCD._Matx_double_3_4_t(self) + + def mul(self, a): + return _OCD._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_3_4___call__(self, i, j) + val = property(_OCD._Matx_double_3_4_val_get, _OCD._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_3_4_swiginit(self, _OCD.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_3_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _OCD: +_OCD._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _OCD._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _OCD._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _OCD._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _OCD._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _OCD._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _OCD._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_4_3_rows + cols = _OCD._Matx_float_4_3_cols + channels = _OCD._Matx_float_4_3_channels + shortdim = _OCD._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_4_3_ddot(self, v) + + def t(self): + return _OCD._Matx_float_4_3_t(self) + + def mul(self, a): + return _OCD._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_4_3___call__(self, i, j) + val = property(_OCD._Matx_float_4_3_val_get, _OCD._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_4_3_swiginit(self, _OCD.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_4_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _OCD: +_OCD._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _OCD._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _OCD._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _OCD._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _OCD._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _OCD._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _OCD._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_4_3_rows + cols = _OCD._Matx_double_4_3_cols + channels = _OCD._Matx_double_4_3_channels + shortdim = _OCD._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_4_3_ddot(self, v) + + def t(self): + return _OCD._Matx_double_4_3_t(self) + + def mul(self, a): + return _OCD._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_4_3___call__(self, i, j) + val = property(_OCD._Matx_double_4_3_val_get, _OCD._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_4_3_swiginit(self, _OCD.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_4_3___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _OCD: +_OCD._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _OCD._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _OCD._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _OCD._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _OCD._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _OCD._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _OCD._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_4_4_rows + cols = _OCD._Matx_float_4_4_cols + channels = _OCD._Matx_float_4_4_channels + shortdim = _OCD._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_4_4_ddot(self, v) + + def t(self): + return _OCD._Matx_float_4_4_t(self) + + def mul(self, a): + return _OCD._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_4_4___call__(self, i, j) + val = property(_OCD._Matx_float_4_4_val_get, _OCD._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_4_4_swiginit(self, _OCD.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_4_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _OCD: +_OCD._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _OCD._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _OCD._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _OCD._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _OCD._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _OCD._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _OCD._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_4_4_rows + cols = _OCD._Matx_double_4_4_cols + channels = _OCD._Matx_double_4_4_channels + shortdim = _OCD._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_4_4_ddot(self, v) + + def t(self): + return _OCD._Matx_double_4_4_t(self) + + def mul(self, a): + return _OCD._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_4_4___call__(self, i, j) + val = property(_OCD._Matx_double_4_4_val_get, _OCD._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_4_4_swiginit(self, _OCD.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_4_4___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _OCD: +_OCD._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _OCD._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _OCD._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _OCD._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _OCD._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _OCD._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _OCD._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_float_6_6_rows + cols = _OCD._Matx_float_6_6_cols + channels = _OCD._Matx_float_6_6_channels + shortdim = _OCD._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _OCD._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _OCD._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_float_6_6_ddot(self, v) + + def t(self): + return _OCD._Matx_float_6_6_t(self) + + def mul(self, a): + return _OCD._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _OCD._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_float_6_6___call__(self, i, j) + val = property(_OCD._Matx_float_6_6_val_get, _OCD._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_float_6_6_swiginit(self, _OCD.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_float_6_6___str__(self) + __swig_destroy__ = _OCD.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _OCD: +_OCD._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _OCD._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _OCD._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _OCD._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _OCD._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _OCD._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _OCD._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _OCD._Matx_double_6_6_rows + cols = _OCD._Matx_double_6_6_cols + channels = _OCD._Matx_double_6_6_channels + shortdim = _OCD._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _OCD._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _OCD._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _OCD._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _OCD._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _OCD._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _OCD._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _OCD._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _OCD._Matx_double_6_6_ddot(self, v) + + def t(self): + return _OCD._Matx_double_6_6_t(self) + + def mul(self, a): + return _OCD._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _OCD._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _OCD._Matx_double_6_6___call__(self, i, j) + val = property(_OCD._Matx_double_6_6_val_get, _OCD._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _OCD._Matx_double_6_6_swiginit(self, _OCD.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _OCD._Matx_double_6_6___str__(self) + __swig_destroy__ = _OCD.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _OCD: +_OCD._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _OCD._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _OCD._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _OCD._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _OCD._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _OCD._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _OCD._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Point__int_swiginit(self, _OCD.new__Point__int(*args)) + + def dot(self, pt): + return _OCD._Point__int_dot(self, pt) + + def ddot(self, pt): + return _OCD._Point__int_ddot(self, pt) + + def cross(self, pt): + return _OCD._Point__int_cross(self, pt) + x = property(_OCD._Point__int_x_get, _OCD._Point__int_x_set) + y = property(_OCD._Point__int_y_get, _OCD._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _OCD._Point__int___str__(self) + __swig_destroy__ = _OCD.delete__Point__int + +# Register _Point__int in _OCD: +_OCD._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Point__float_swiginit(self, _OCD.new__Point__float(*args)) + + def dot(self, pt): + return _OCD._Point__float_dot(self, pt) + + def ddot(self, pt): + return _OCD._Point__float_ddot(self, pt) + + def cross(self, pt): + return _OCD._Point__float_cross(self, pt) + x = property(_OCD._Point__float_x_get, _OCD._Point__float_x_set) + y = property(_OCD._Point__float_y_get, _OCD._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _OCD._Point__float___str__(self) + __swig_destroy__ = _OCD.delete__Point__float + +# Register _Point__float in _OCD: +_OCD._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Point__double_swiginit(self, _OCD.new__Point__double(*args)) + + def dot(self, pt): + return _OCD._Point__double_dot(self, pt) + + def ddot(self, pt): + return _OCD._Point__double_ddot(self, pt) + + def cross(self, pt): + return _OCD._Point__double_cross(self, pt) + x = property(_OCD._Point__double_x_get, _OCD._Point__double_x_set) + y = property(_OCD._Point__double_y_get, _OCD._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _OCD._Point__double___str__(self) + __swig_destroy__ = _OCD.delete__Point__double + +# Register _Point__double in _OCD: +_OCD._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Rect__int_swiginit(self, _OCD.new__Rect__int(*args)) + + def tl(self): + return _OCD._Rect__int_tl(self) + + def br(self): + return _OCD._Rect__int_br(self) + + def size(self): + return _OCD._Rect__int_size(self) + + def area(self): + return _OCD._Rect__int_area(self) + + def contains(self, pt): + return _OCD._Rect__int_contains(self, pt) + x = property(_OCD._Rect__int_x_get, _OCD._Rect__int_x_set) + y = property(_OCD._Rect__int_y_get, _OCD._Rect__int_y_set) + width = property(_OCD._Rect__int_width_get, _OCD._Rect__int_width_set) + height = property(_OCD._Rect__int_height_get, _OCD._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _OCD._Rect__int___str__(self) + __swig_destroy__ = _OCD.delete__Rect__int + +# Register _Rect__int in _OCD: +_OCD._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Rect__float_swiginit(self, _OCD.new__Rect__float(*args)) + + def tl(self): + return _OCD._Rect__float_tl(self) + + def br(self): + return _OCD._Rect__float_br(self) + + def size(self): + return _OCD._Rect__float_size(self) + + def area(self): + return _OCD._Rect__float_area(self) + + def contains(self, pt): + return _OCD._Rect__float_contains(self, pt) + x = property(_OCD._Rect__float_x_get, _OCD._Rect__float_x_set) + y = property(_OCD._Rect__float_y_get, _OCD._Rect__float_y_set) + width = property(_OCD._Rect__float_width_get, _OCD._Rect__float_width_set) + height = property(_OCD._Rect__float_height_get, _OCD._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _OCD._Rect__float___str__(self) + __swig_destroy__ = _OCD.delete__Rect__float + +# Register _Rect__float in _OCD: +_OCD._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Rect__double_swiginit(self, _OCD.new__Rect__double(*args)) + + def tl(self): + return _OCD._Rect__double_tl(self) + + def br(self): + return _OCD._Rect__double_br(self) + + def size(self): + return _OCD._Rect__double_size(self) + + def area(self): + return _OCD._Rect__double_area(self) + + def contains(self, pt): + return _OCD._Rect__double_contains(self, pt) + x = property(_OCD._Rect__double_x_get, _OCD._Rect__double_x_set) + y = property(_OCD._Rect__double_y_get, _OCD._Rect__double_y_set) + width = property(_OCD._Rect__double_width_get, _OCD._Rect__double_width_set) + height = property(_OCD._Rect__double_height_get, _OCD._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _OCD._Rect__double___str__(self) + __swig_destroy__ = _OCD.delete__Rect__double + +# Register _Rect__double in _OCD: +_OCD._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Scalar__double_swiginit(self, _OCD.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _OCD._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _OCD._Scalar__double_mul(self, a, scale) + + def conj(self): + return _OCD._Scalar__double_conj(self) + + def isReal(self): + return _OCD._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _OCD._Scalar__double___str__(self) + __swig_destroy__ = _OCD.delete__Scalar__double + +# Register _Scalar__double in _OCD: +_OCD._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _OCD._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Size__int_swiginit(self, _OCD.new__Size__int(*args)) + + def area(self): + return _OCD._Size__int_area(self) + width = property(_OCD._Size__int_width_get, _OCD._Size__int_width_set) + height = property(_OCD._Size__int_height_get, _OCD._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _OCD._Size__int___str__(self) + __swig_destroy__ = _OCD.delete__Size__int + +# Register _Size__int in _OCD: +_OCD._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Size__float_swiginit(self, _OCD.new__Size__float(*args)) + + def area(self): + return _OCD._Size__float_area(self) + width = property(_OCD._Size__float_width_get, _OCD._Size__float_width_set) + height = property(_OCD._Size__float_height_get, _OCD._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _OCD._Size__float___str__(self) + __swig_destroy__ = _OCD.delete__Size__float + +# Register _Size__float in _OCD: +_OCD._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _OCD._Size__double_swiginit(self, _OCD.new__Size__double(*args)) + + def area(self): + return _OCD._Size__double_area(self) + width = property(_OCD._Size__double_width_get, _OCD._Size__double_width_set) + height = property(_OCD._Size__double_height_get, _OCD._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _OCD._Size__double___str__(self) + __swig_destroy__ = _OCD.delete__Size__double + +# Register _Size__double in _OCD: +_OCD._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def OCD(file1, file2, outfile, dir): + return _OCD.OCD(file1, file2, outfile, dir) + + diff --git a/plugins/veg_method/scripts/SH.py b/plugins/veg_method/scripts/SH.py new file mode 100644 index 0000000..fcff025 --- /dev/null +++ b/plugins/veg_method/scripts/SH.py @@ -0,0 +1,12424 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _SH +else: + import _SH + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +import sys as _sys +if _sys.byteorder == 'little': + _cv_numpy_endianess = '<' +else: + _cv_numpy_endianess = '>' + +_cv_numpy_typestr_map = {} +_cv_numpy_bla = {} + +CV_VERSION_MAJOR = _SH.CV_VERSION_MAJOR +CV_VERSION_MINOR = _SH.CV_VERSION_MINOR +CV_VERSION_REVISION = _SH.CV_VERSION_REVISION +CV_VERSION_STATUS = _SH.CV_VERSION_STATUS +CV_VERSION = _SH.CV_VERSION +CV_MAJOR_VERSION = _SH.CV_MAJOR_VERSION +CV_MINOR_VERSION = _SH.CV_MINOR_VERSION +CV_SUBMINOR_VERSION = _SH.CV_SUBMINOR_VERSION +class DataType_bool(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_bool_generic_type + channels = _SH.DataType_bool_channels + fmt = _SH.DataType_bool_fmt + + def __init__(self): + _SH.DataType_bool_swiginit(self, _SH.new_DataType_bool()) + __swig_destroy__ = _SH.delete_DataType_bool + +# Register DataType_bool in _SH: +_SH.DataType_bool_swigregister(DataType_bool) + +class DataType_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_uchar_generic_type + channels = _SH.DataType_uchar_channels + fmt = _SH.DataType_uchar_fmt + + def __init__(self): + _SH.DataType_uchar_swiginit(self, _SH.new_DataType_uchar()) + __swig_destroy__ = _SH.delete_DataType_uchar + +# Register DataType_uchar in _SH: +_SH.DataType_uchar_swigregister(DataType_uchar) + +class DataType_schar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_schar_generic_type + channels = _SH.DataType_schar_channels + fmt = _SH.DataType_schar_fmt + + def __init__(self): + _SH.DataType_schar_swiginit(self, _SH.new_DataType_schar()) + __swig_destroy__ = _SH.delete_DataType_schar + +# Register DataType_schar in _SH: +_SH.DataType_schar_swigregister(DataType_schar) + +class DataType_char(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_char_generic_type + channels = _SH.DataType_char_channels + fmt = _SH.DataType_char_fmt + + def __init__(self): + _SH.DataType_char_swiginit(self, _SH.new_DataType_char()) + __swig_destroy__ = _SH.delete_DataType_char + +# Register DataType_char in _SH: +_SH.DataType_char_swigregister(DataType_char) + +class DataType_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_ushort_generic_type + channels = _SH.DataType_ushort_channels + fmt = _SH.DataType_ushort_fmt + + def __init__(self): + _SH.DataType_ushort_swiginit(self, _SH.new_DataType_ushort()) + __swig_destroy__ = _SH.delete_DataType_ushort + +# Register DataType_ushort in _SH: +_SH.DataType_ushort_swigregister(DataType_ushort) + +class DataType_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_short_generic_type + channels = _SH.DataType_short_channels + fmt = _SH.DataType_short_fmt + + def __init__(self): + _SH.DataType_short_swiginit(self, _SH.new_DataType_short()) + __swig_destroy__ = _SH.delete_DataType_short + +# Register DataType_short in _SH: +_SH.DataType_short_swigregister(DataType_short) + +class DataType_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_int_generic_type + channels = _SH.DataType_int_channels + fmt = _SH.DataType_int_fmt + + def __init__(self): + _SH.DataType_int_swiginit(self, _SH.new_DataType_int()) + __swig_destroy__ = _SH.delete_DataType_int + +# Register DataType_int in _SH: +_SH.DataType_int_swigregister(DataType_int) + +class DataType_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_float_generic_type + channels = _SH.DataType_float_channels + fmt = _SH.DataType_float_fmt + + def __init__(self): + _SH.DataType_float_swiginit(self, _SH.new_DataType_float()) + __swig_destroy__ = _SH.delete_DataType_float + +# Register DataType_float in _SH: +_SH.DataType_float_swigregister(DataType_float) + +class DataType_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH.DataType_double_generic_type + channels = _SH.DataType_double_channels + fmt = _SH.DataType_double_fmt + + def __init__(self): + _SH.DataType_double_swiginit(self, _SH.new_DataType_double()) + __swig_destroy__ = _SH.delete_DataType_double + +# Register DataType_double in _SH: +_SH.DataType_double_swigregister(DataType_double) + +class Range(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH.Range_swiginit(self, _SH.new_Range(*args)) + + def size(self): + return _SH.Range_size(self) + + def empty(self): + return _SH.Range_empty(self) + + @staticmethod + def all(): + return _SH.Range_all() + start = property(_SH.Range_start_get, _SH.Range_start_set) + end = property(_SH.Range_end_get, _SH.Range_end_set) + __swig_destroy__ = _SH.delete_Range + +# Register Range in _SH: +_SH.Range_swigregister(Range) + +def Range_all(): + return _SH.Range_all() + +class SwigPyIterator(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _SH.delete_SwigPyIterator + + def value(self): + return _SH.SwigPyIterator_value(self) + + def incr(self, n=1): + return _SH.SwigPyIterator_incr(self, n) + + def decr(self, n=1): + return _SH.SwigPyIterator_decr(self, n) + + def distance(self, x): + return _SH.SwigPyIterator_distance(self, x) + + def equal(self, x): + return _SH.SwigPyIterator_equal(self, x) + + def copy(self): + return _SH.SwigPyIterator_copy(self) + + def next(self): + return _SH.SwigPyIterator_next(self) + + def __next__(self): + return _SH.SwigPyIterator___next__(self) + + def previous(self): + return _SH.SwigPyIterator_previous(self) + + def advance(self, n): + return _SH.SwigPyIterator_advance(self, n) + + def __eq__(self, x): + return _SH.SwigPyIterator___eq__(self, x) + + def __ne__(self, x): + return _SH.SwigPyIterator___ne__(self, x) + + def __iadd__(self, n): + return _SH.SwigPyIterator___iadd__(self, n) + + def __isub__(self, n): + return _SH.SwigPyIterator___isub__(self, n) + + def __add__(self, n): + return _SH.SwigPyIterator___add__(self, n) + + def __sub__(self, *args): + return _SH.SwigPyIterator___sub__(self, *args) + def __iter__(self): + return self + +# Register SwigPyIterator in _SH: +_SH.SwigPyIterator_swigregister(SwigPyIterator) + + +_array_map = {} + +class Matx_AddOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_AddOp_swiginit(self, _SH.new_Matx_AddOp()) + __swig_destroy__ = _SH.delete_Matx_AddOp + +# Register Matx_AddOp in _SH: +_SH.Matx_AddOp_swigregister(Matx_AddOp) + +class Matx_SubOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_SubOp_swiginit(self, _SH.new_Matx_SubOp()) + __swig_destroy__ = _SH.delete_Matx_SubOp + +# Register Matx_SubOp in _SH: +_SH.Matx_SubOp_swigregister(Matx_SubOp) + +class Matx_ScaleOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_ScaleOp_swiginit(self, _SH.new_Matx_ScaleOp()) + __swig_destroy__ = _SH.delete_Matx_ScaleOp + +# Register Matx_ScaleOp in _SH: +_SH.Matx_ScaleOp_swigregister(Matx_ScaleOp) + +class Matx_MulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_MulOp_swiginit(self, _SH.new_Matx_MulOp()) + __swig_destroy__ = _SH.delete_Matx_MulOp + +# Register Matx_MulOp in _SH: +_SH.Matx_MulOp_swigregister(Matx_MulOp) + +class Matx_DivOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_DivOp_swiginit(self, _SH.new_Matx_DivOp()) + __swig_destroy__ = _SH.delete_Matx_DivOp + +# Register Matx_DivOp in _SH: +_SH.Matx_DivOp_swigregister(Matx_DivOp) + +class Matx_MatMulOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_MatMulOp_swiginit(self, _SH.new_Matx_MatMulOp()) + __swig_destroy__ = _SH.delete_Matx_MatMulOp + +# Register Matx_MatMulOp in _SH: +_SH.Matx_MatMulOp_swigregister(Matx_MatMulOp) + +class Matx_TOp(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH.Matx_TOp_swiginit(self, _SH.new_Matx_TOp()) + __swig_destroy__ = _SH.delete_Matx_TOp + +# Register Matx_TOp in _SH: +_SH.Matx_TOp_swigregister(Matx_TOp) + +class Mat(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _SH.delete_Mat + + def row(self, y): + return _SH.Mat_row(self, y) + + def col(self, x): + return _SH.Mat_col(self, x) + + def rowRange(self, *args): + return _SH.Mat_rowRange(self, *args) + + def colRange(self, *args): + return _SH.Mat_colRange(self, *args) + + def diag(self, d=0): + return _SH.Mat_diag(self, d) + + def clone(self): + return _SH.Mat_clone(self) + + def assignTo(self, m, type=-1): + return _SH.Mat_assignTo(self, m, type) + + def reshape(self, *args): + return _SH.Mat_reshape(self, *args) + + def create(self, *args): + return _SH.Mat_create(self, *args) + + def addref(self): + return _SH.Mat_addref(self) + + def release(self): + return _SH.Mat_release(self) + + def deallocate(self): + return _SH.Mat_deallocate(self) + + def copySize(self, m): + return _SH.Mat_copySize(self, m) + + def reserve(self, sz): + return _SH.Mat_reserve(self, sz) + + def resize(self, *args): + return _SH.Mat_resize(self, *args) + + def push_back_(self, elem): + return _SH.Mat_push_back_(self, elem) + + def push_back(self, m): + return _SH.Mat_push_back(self, m) + + def pop_back(self, nelems=1): + return _SH.Mat_pop_back(self, nelems) + + def locateROI(self, wholeSize, ofs): + return _SH.Mat_locateROI(self, wholeSize, ofs) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH.Mat_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH.Mat___call__(self, *args) + + def isContinuous(self): + return _SH.Mat_isContinuous(self) + + def isSubmatrix(self): + return _SH.Mat_isSubmatrix(self) + + def elemSize(self): + return _SH.Mat_elemSize(self) + + def elemSize1(self): + return _SH.Mat_elemSize1(self) + + def type(self): + return _SH.Mat_type(self) + + def depth(self): + return _SH.Mat_depth(self) + + def channels(self): + return _SH.Mat_channels(self) + + def step1(self, i=0): + return _SH.Mat_step1(self, i) + + def empty(self): + return _SH.Mat_empty(self) + + def total(self): + return _SH.Mat_total(self) + + def checkVector(self, elemChannels, depth=-1, requireContinuous=True): + return _SH.Mat_checkVector(self, elemChannels, depth, requireContinuous) + + def ptr(self, *args): + return _SH.Mat_ptr(self, *args) + MAGIC_VAL = _SH.Mat_MAGIC_VAL + AUTO_STEP = _SH.Mat_AUTO_STEP + CONTINUOUS_FLAG = _SH.Mat_CONTINUOUS_FLAG + SUBMATRIX_FLAG = _SH.Mat_SUBMATRIX_FLAG + MAGIC_MASK = _SH.Mat_MAGIC_MASK + TYPE_MASK = _SH.Mat_TYPE_MASK + DEPTH_MASK = _SH.Mat_DEPTH_MASK + flags = property(_SH.Mat_flags_get, _SH.Mat_flags_set) + dims = property(_SH.Mat_dims_get, _SH.Mat_dims_set) + rows = property(_SH.Mat_rows_get, _SH.Mat_rows_set) + cols = property(_SH.Mat_cols_get, _SH.Mat_cols_set) + data = property(_SH.Mat_data_get, _SH.Mat_data_set) + datastart = property(_SH.Mat_datastart_get, _SH.Mat_datastart_set) + dataend = property(_SH.Mat_dataend_get, _SH.Mat_dataend_set) + datalimit = property(_SH.Mat_datalimit_get, _SH.Mat_datalimit_set) + + def __init__(self, *args): + _SH.Mat_swiginit(self, _SH.new_Mat(*args)) + + def _typestr(self): + typestr = _depthToDtype(self.depth()) + if typestr[-1] == '1': + typestr = '|' + typestr + else: + typestr = _cv_numpy_endianess + typestr + + return typestr + + + @classmethod + def __get_channels(cls, array): + if len(array.shape) == 3: + n_channel = array.shape[2] + if n_channel == 1: + raise ValueError("{} expects an one channel numpy ndarray be 2-dimensional.".format(cls)) + elif len(array.shape) == 2: + n_channel = 1 + else: + raise ValueError("{} supports only 2 or 3-dimensional numpy ndarray.".format(cls)) + + return n_channel + + + def __getattribute__(self, name): + if name == "__array_interface__": + n_channels = self.channels() + if n_channels == 1: + shape = (self.rows, self.cols) + else: + shape = (self.rows, self.cols, n_channels) + + return {"shape": shape, + "typestr": self._typestr(), + "data": (int(self.data), False)} + + else: + return object.__getattribute__(self, name) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + dtype = array.__array_interface__['typestr'] + dtype = dtype[1:] + + n_channel = cls.__get_channels(array) + + new_mat = Mat(array.shape[0], + array.shape[1], + _toCvType(dtype, n_channel), + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH.Mat___str__(self) + +# Register Mat in _SH: +_SH.Mat_swigregister(Mat) + +class _cv_numpy_sizeof_uint8_t(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_uint8_t_value + + def __init__(self): + _SH._cv_numpy_sizeof_uint8_t_swiginit(self, _SH.new__cv_numpy_sizeof_uint8_t()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_uint8_t + +# Register _cv_numpy_sizeof_uint8_t in _SH: +_SH._cv_numpy_sizeof_uint8_t_swigregister(_cv_numpy_sizeof_uint8_t) + + +if _cv_numpy_sizeof_uint8_t.value == 1: + _cv_numpy_typestr_map["uint8_t"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uint8_t"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uint8_t.value) + +class uint8_tArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.uint8_tArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.uint8_tArray___nonzero__(self) + + def __bool__(self): + return _SH.uint8_tArray___bool__(self) + + def __len__(self): + return _SH.uint8_tArray___len__(self) + + def __getslice__(self, i, j): + return _SH.uint8_tArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.uint8_tArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.uint8_tArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.uint8_tArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.uint8_tArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.uint8_tArray___setitem__(self, *args) + + def pop(self): + return _SH.uint8_tArray_pop(self) + + def append(self, x): + return _SH.uint8_tArray_append(self, x) + + def empty(self): + return _SH.uint8_tArray_empty(self) + + def size(self): + return _SH.uint8_tArray_size(self) + + def swap(self, v): + return _SH.uint8_tArray_swap(self, v) + + def begin(self): + return _SH.uint8_tArray_begin(self) + + def end(self): + return _SH.uint8_tArray_end(self) + + def rbegin(self): + return _SH.uint8_tArray_rbegin(self) + + def rend(self): + return _SH.uint8_tArray_rend(self) + + def clear(self): + return _SH.uint8_tArray_clear(self) + + def get_allocator(self): + return _SH.uint8_tArray_get_allocator(self) + + def pop_back(self): + return _SH.uint8_tArray_pop_back(self) + + def erase(self, *args): + return _SH.uint8_tArray_erase(self, *args) + + def __init__(self, *args): + _SH.uint8_tArray_swiginit(self, _SH.new_uint8_tArray(*args)) + + def push_back(self, x): + return _SH.uint8_tArray_push_back(self, x) + + def front(self): + return _SH.uint8_tArray_front(self) + + def back(self): + return _SH.uint8_tArray_back(self) + + def assign(self, n, x): + return _SH.uint8_tArray_assign(self, n, x) + + def resize(self, *args): + return _SH.uint8_tArray_resize(self, *args) + + def insert(self, *args): + return _SH.uint8_tArray_insert(self, *args) + + def reserve(self, n): + return _SH.uint8_tArray_reserve(self, n) + + def capacity(self): + return _SH.uint8_tArray_capacity(self) + __swig_destroy__ = _SH.delete_uint8_tArray + +# Register uint8_tArray in _SH: +_SH.uint8_tArray_swigregister(uint8_tArray) + + +_array_map["uint8_t"] =uint8_tArray + +class _Matx_uint8_t_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_uint8_t_2_1_rows + cols = _SH._Matx_uint8_t_2_1_cols + channels = _SH._Matx_uint8_t_2_1_channels + shortdim = _SH._Matx_uint8_t_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_uint8_t_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_uint8_t_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_uint8_t_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_uint8_t_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_uint8_t_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_uint8_t_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_uint8_t_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_uint8_t_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_uint8_t_2_1_t(self) + + def mul(self, a): + return _SH._Matx_uint8_t_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_uint8_t_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_uint8_t_2_1___call__(self, i, j) + val = property(_SH._Matx_uint8_t_2_1_val_get, _SH._Matx_uint8_t_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_uint8_t_2_1_swiginit(self, _SH.new__Matx_uint8_t_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_uint8_t_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_uint8_t_2_1 + +# Register _Matx_uint8_t_2_1 in _SH: +_SH._Matx_uint8_t_2_1_swigregister(_Matx_uint8_t_2_1) + +def _Matx_uint8_t_2_1_all(alpha): + return _SH._Matx_uint8_t_2_1_all(alpha) + +def _Matx_uint8_t_2_1_zeros(): + return _SH._Matx_uint8_t_2_1_zeros() + +def _Matx_uint8_t_2_1_ones(): + return _SH._Matx_uint8_t_2_1_ones() + +def _Matx_uint8_t_2_1_eye(): + return _SH._Matx_uint8_t_2_1_eye() + +def _Matx_uint8_t_2_1_randu(a, b): + return _SH._Matx_uint8_t_2_1_randu(a, b) + +def _Matx_uint8_t_2_1_randn(a, b): + return _SH._Matx_uint8_t_2_1_randn(a, b) + + +Matx21b = _Matx_uint8_t_2_1 + +class _Vec_uint8_t_2(_Matx_uint8_t_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_uint8_t_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_uint8_t_2_all(alpha) + + def mul(self, v): + return _SH._Vec_uint8_t_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_uint8_t_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_uint8_t_2_swiginit(self, _SH.new__Vec_uint8_t_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_uint8_t_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_uint8_t_2 + +# Register _Vec_uint8_t_2 in _SH: +_SH._Vec_uint8_t_2_swigregister(_Vec_uint8_t_2) + +def _Vec_uint8_t_2_all(alpha): + return _SH._Vec_uint8_t_2_all(alpha) + +class _DataType_Vec_uint8_t_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_uint8_t_2_generic_type + channels = _SH._DataType_Vec_uint8_t_2_channels + fmt = _SH._DataType_Vec_uint8_t_2_fmt + + def __init__(self): + _SH._DataType_Vec_uint8_t_2_swiginit(self, _SH.new__DataType_Vec_uint8_t_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_uint8_t_2 + +# Register _DataType_Vec_uint8_t_2 in _SH: +_SH._DataType_Vec_uint8_t_2_swigregister(_DataType_Vec_uint8_t_2) + + +Vec2b = _Vec_uint8_t_2 +DataType_Vec2b = _DataType_Vec_uint8_t_2 + +class _Matx_uint8_t_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_uint8_t_3_1_rows + cols = _SH._Matx_uint8_t_3_1_cols + channels = _SH._Matx_uint8_t_3_1_channels + shortdim = _SH._Matx_uint8_t_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_uint8_t_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_uint8_t_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_uint8_t_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_uint8_t_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_uint8_t_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_uint8_t_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_uint8_t_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_uint8_t_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_uint8_t_3_1_t(self) + + def mul(self, a): + return _SH._Matx_uint8_t_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_uint8_t_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_uint8_t_3_1___call__(self, i, j) + val = property(_SH._Matx_uint8_t_3_1_val_get, _SH._Matx_uint8_t_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_uint8_t_3_1_swiginit(self, _SH.new__Matx_uint8_t_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_uint8_t_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_uint8_t_3_1 + +# Register _Matx_uint8_t_3_1 in _SH: +_SH._Matx_uint8_t_3_1_swigregister(_Matx_uint8_t_3_1) + +def _Matx_uint8_t_3_1_all(alpha): + return _SH._Matx_uint8_t_3_1_all(alpha) + +def _Matx_uint8_t_3_1_zeros(): + return _SH._Matx_uint8_t_3_1_zeros() + +def _Matx_uint8_t_3_1_ones(): + return _SH._Matx_uint8_t_3_1_ones() + +def _Matx_uint8_t_3_1_eye(): + return _SH._Matx_uint8_t_3_1_eye() + +def _Matx_uint8_t_3_1_randu(a, b): + return _SH._Matx_uint8_t_3_1_randu(a, b) + +def _Matx_uint8_t_3_1_randn(a, b): + return _SH._Matx_uint8_t_3_1_randn(a, b) + + +Matx31b = _Matx_uint8_t_3_1 + +class _Vec_uint8_t_3(_Matx_uint8_t_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_uint8_t_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_uint8_t_3_all(alpha) + + def mul(self, v): + return _SH._Vec_uint8_t_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_uint8_t_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_uint8_t_3_swiginit(self, _SH.new__Vec_uint8_t_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_uint8_t_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_uint8_t_3 + +# Register _Vec_uint8_t_3 in _SH: +_SH._Vec_uint8_t_3_swigregister(_Vec_uint8_t_3) + +def _Vec_uint8_t_3_all(alpha): + return _SH._Vec_uint8_t_3_all(alpha) + +class _DataType_Vec_uint8_t_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_uint8_t_3_generic_type + channels = _SH._DataType_Vec_uint8_t_3_channels + fmt = _SH._DataType_Vec_uint8_t_3_fmt + + def __init__(self): + _SH._DataType_Vec_uint8_t_3_swiginit(self, _SH.new__DataType_Vec_uint8_t_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_uint8_t_3 + +# Register _DataType_Vec_uint8_t_3 in _SH: +_SH._DataType_Vec_uint8_t_3_swigregister(_DataType_Vec_uint8_t_3) + + +Vec3b = _Vec_uint8_t_3 +DataType_Vec3b = _DataType_Vec_uint8_t_3 + +class _Matx_uint8_t_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_uint8_t_4_1_rows + cols = _SH._Matx_uint8_t_4_1_cols + channels = _SH._Matx_uint8_t_4_1_channels + shortdim = _SH._Matx_uint8_t_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_uint8_t_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_uint8_t_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_uint8_t_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_uint8_t_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_uint8_t_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_uint8_t_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_uint8_t_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_uint8_t_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_uint8_t_4_1_t(self) + + def mul(self, a): + return _SH._Matx_uint8_t_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_uint8_t_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_uint8_t_4_1___call__(self, i, j) + val = property(_SH._Matx_uint8_t_4_1_val_get, _SH._Matx_uint8_t_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_uint8_t_4_1_swiginit(self, _SH.new__Matx_uint8_t_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_uint8_t_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_uint8_t_4_1 + +# Register _Matx_uint8_t_4_1 in _SH: +_SH._Matx_uint8_t_4_1_swigregister(_Matx_uint8_t_4_1) + +def _Matx_uint8_t_4_1_all(alpha): + return _SH._Matx_uint8_t_4_1_all(alpha) + +def _Matx_uint8_t_4_1_zeros(): + return _SH._Matx_uint8_t_4_1_zeros() + +def _Matx_uint8_t_4_1_ones(): + return _SH._Matx_uint8_t_4_1_ones() + +def _Matx_uint8_t_4_1_eye(): + return _SH._Matx_uint8_t_4_1_eye() + +def _Matx_uint8_t_4_1_randu(a, b): + return _SH._Matx_uint8_t_4_1_randu(a, b) + +def _Matx_uint8_t_4_1_randn(a, b): + return _SH._Matx_uint8_t_4_1_randn(a, b) + + +Matx41b = _Matx_uint8_t_4_1 + +class _Vec_uint8_t_4(_Matx_uint8_t_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_uint8_t_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_uint8_t_4_all(alpha) + + def mul(self, v): + return _SH._Vec_uint8_t_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_uint8_t_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_uint8_t_4_swiginit(self, _SH.new__Vec_uint8_t_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_uint8_t_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_uint8_t_4 + +# Register _Vec_uint8_t_4 in _SH: +_SH._Vec_uint8_t_4_swigregister(_Vec_uint8_t_4) + +def _Vec_uint8_t_4_all(alpha): + return _SH._Vec_uint8_t_4_all(alpha) + +class _DataType_Vec_uint8_t_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_uint8_t_4_generic_type + channels = _SH._DataType_Vec_uint8_t_4_channels + fmt = _SH._DataType_Vec_uint8_t_4_fmt + + def __init__(self): + _SH._DataType_Vec_uint8_t_4_swiginit(self, _SH.new__DataType_Vec_uint8_t_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_uint8_t_4 + +# Register _DataType_Vec_uint8_t_4 in _SH: +_SH._DataType_Vec_uint8_t_4_swigregister(_DataType_Vec_uint8_t_4) + + +Vec4b = _Vec_uint8_t_4 +DataType_Vec4b = _DataType_Vec_uint8_t_4 + +class _cv_numpy_sizeof_short(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_short_value + + def __init__(self): + _SH._cv_numpy_sizeof_short_swiginit(self, _SH.new__cv_numpy_sizeof_short()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_short + +# Register _cv_numpy_sizeof_short in _SH: +_SH._cv_numpy_sizeof_short_swigregister(_cv_numpy_sizeof_short) + + +if _cv_numpy_sizeof_short.value == 1: + _cv_numpy_typestr_map["short"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["short"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_short.value) + +class shortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.shortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.shortArray___nonzero__(self) + + def __bool__(self): + return _SH.shortArray___bool__(self) + + def __len__(self): + return _SH.shortArray___len__(self) + + def __getslice__(self, i, j): + return _SH.shortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.shortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.shortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.shortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.shortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.shortArray___setitem__(self, *args) + + def pop(self): + return _SH.shortArray_pop(self) + + def append(self, x): + return _SH.shortArray_append(self, x) + + def empty(self): + return _SH.shortArray_empty(self) + + def size(self): + return _SH.shortArray_size(self) + + def swap(self, v): + return _SH.shortArray_swap(self, v) + + def begin(self): + return _SH.shortArray_begin(self) + + def end(self): + return _SH.shortArray_end(self) + + def rbegin(self): + return _SH.shortArray_rbegin(self) + + def rend(self): + return _SH.shortArray_rend(self) + + def clear(self): + return _SH.shortArray_clear(self) + + def get_allocator(self): + return _SH.shortArray_get_allocator(self) + + def pop_back(self): + return _SH.shortArray_pop_back(self) + + def erase(self, *args): + return _SH.shortArray_erase(self, *args) + + def __init__(self, *args): + _SH.shortArray_swiginit(self, _SH.new_shortArray(*args)) + + def push_back(self, x): + return _SH.shortArray_push_back(self, x) + + def front(self): + return _SH.shortArray_front(self) + + def back(self): + return _SH.shortArray_back(self) + + def assign(self, n, x): + return _SH.shortArray_assign(self, n, x) + + def resize(self, *args): + return _SH.shortArray_resize(self, *args) + + def insert(self, *args): + return _SH.shortArray_insert(self, *args) + + def reserve(self, n): + return _SH.shortArray_reserve(self, n) + + def capacity(self): + return _SH.shortArray_capacity(self) + __swig_destroy__ = _SH.delete_shortArray + +# Register shortArray in _SH: +_SH.shortArray_swigregister(shortArray) + + +_array_map["short"] =shortArray + +class _Matx_short_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_short_2_1_rows + cols = _SH._Matx_short_2_1_cols + channels = _SH._Matx_short_2_1_channels + shortdim = _SH._Matx_short_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_short_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_short_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_short_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_short_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_short_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_short_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_short_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_short_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_short_2_1_t(self) + + def mul(self, a): + return _SH._Matx_short_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_short_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_short_2_1___call__(self, i, j) + val = property(_SH._Matx_short_2_1_val_get, _SH._Matx_short_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_short_2_1_swiginit(self, _SH.new__Matx_short_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_short_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_short_2_1 + +# Register _Matx_short_2_1 in _SH: +_SH._Matx_short_2_1_swigregister(_Matx_short_2_1) + +def _Matx_short_2_1_all(alpha): + return _SH._Matx_short_2_1_all(alpha) + +def _Matx_short_2_1_zeros(): + return _SH._Matx_short_2_1_zeros() + +def _Matx_short_2_1_ones(): + return _SH._Matx_short_2_1_ones() + +def _Matx_short_2_1_eye(): + return _SH._Matx_short_2_1_eye() + +def _Matx_short_2_1_randu(a, b): + return _SH._Matx_short_2_1_randu(a, b) + +def _Matx_short_2_1_randn(a, b): + return _SH._Matx_short_2_1_randn(a, b) + + +Matx21s = _Matx_short_2_1 + +class _Vec_short_2(_Matx_short_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_short_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_short_2_all(alpha) + + def mul(self, v): + return _SH._Vec_short_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_short_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_short_2_swiginit(self, _SH.new__Vec_short_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_short_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_short_2 + +# Register _Vec_short_2 in _SH: +_SH._Vec_short_2_swigregister(_Vec_short_2) + +def _Vec_short_2_all(alpha): + return _SH._Vec_short_2_all(alpha) + +class _DataType_Vec_short_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_short_2_generic_type + channels = _SH._DataType_Vec_short_2_channels + fmt = _SH._DataType_Vec_short_2_fmt + + def __init__(self): + _SH._DataType_Vec_short_2_swiginit(self, _SH.new__DataType_Vec_short_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_short_2 + +# Register _DataType_Vec_short_2 in _SH: +_SH._DataType_Vec_short_2_swigregister(_DataType_Vec_short_2) + + +Vec2s = _Vec_short_2 +DataType_Vec2s = _DataType_Vec_short_2 + +class _Matx_short_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_short_3_1_rows + cols = _SH._Matx_short_3_1_cols + channels = _SH._Matx_short_3_1_channels + shortdim = _SH._Matx_short_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_short_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_short_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_short_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_short_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_short_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_short_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_short_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_short_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_short_3_1_t(self) + + def mul(self, a): + return _SH._Matx_short_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_short_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_short_3_1___call__(self, i, j) + val = property(_SH._Matx_short_3_1_val_get, _SH._Matx_short_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_short_3_1_swiginit(self, _SH.new__Matx_short_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_short_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_short_3_1 + +# Register _Matx_short_3_1 in _SH: +_SH._Matx_short_3_1_swigregister(_Matx_short_3_1) + +def _Matx_short_3_1_all(alpha): + return _SH._Matx_short_3_1_all(alpha) + +def _Matx_short_3_1_zeros(): + return _SH._Matx_short_3_1_zeros() + +def _Matx_short_3_1_ones(): + return _SH._Matx_short_3_1_ones() + +def _Matx_short_3_1_eye(): + return _SH._Matx_short_3_1_eye() + +def _Matx_short_3_1_randu(a, b): + return _SH._Matx_short_3_1_randu(a, b) + +def _Matx_short_3_1_randn(a, b): + return _SH._Matx_short_3_1_randn(a, b) + + +Matx31s = _Matx_short_3_1 + +class _Vec_short_3(_Matx_short_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_short_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_short_3_all(alpha) + + def mul(self, v): + return _SH._Vec_short_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_short_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_short_3_swiginit(self, _SH.new__Vec_short_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_short_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_short_3 + +# Register _Vec_short_3 in _SH: +_SH._Vec_short_3_swigregister(_Vec_short_3) + +def _Vec_short_3_all(alpha): + return _SH._Vec_short_3_all(alpha) + +class _DataType_Vec_short_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_short_3_generic_type + channels = _SH._DataType_Vec_short_3_channels + fmt = _SH._DataType_Vec_short_3_fmt + + def __init__(self): + _SH._DataType_Vec_short_3_swiginit(self, _SH.new__DataType_Vec_short_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_short_3 + +# Register _DataType_Vec_short_3 in _SH: +_SH._DataType_Vec_short_3_swigregister(_DataType_Vec_short_3) + + +Vec3s = _Vec_short_3 +DataType_Vec3s = _DataType_Vec_short_3 + +class _Matx_short_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_short_4_1_rows + cols = _SH._Matx_short_4_1_cols + channels = _SH._Matx_short_4_1_channels + shortdim = _SH._Matx_short_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_short_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_short_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_short_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_short_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_short_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_short_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_short_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_short_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_short_4_1_t(self) + + def mul(self, a): + return _SH._Matx_short_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_short_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_short_4_1___call__(self, i, j) + val = property(_SH._Matx_short_4_1_val_get, _SH._Matx_short_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_short_4_1_swiginit(self, _SH.new__Matx_short_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_short_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_short_4_1 + +# Register _Matx_short_4_1 in _SH: +_SH._Matx_short_4_1_swigregister(_Matx_short_4_1) + +def _Matx_short_4_1_all(alpha): + return _SH._Matx_short_4_1_all(alpha) + +def _Matx_short_4_1_zeros(): + return _SH._Matx_short_4_1_zeros() + +def _Matx_short_4_1_ones(): + return _SH._Matx_short_4_1_ones() + +def _Matx_short_4_1_eye(): + return _SH._Matx_short_4_1_eye() + +def _Matx_short_4_1_randu(a, b): + return _SH._Matx_short_4_1_randu(a, b) + +def _Matx_short_4_1_randn(a, b): + return _SH._Matx_short_4_1_randn(a, b) + + +Matx41s = _Matx_short_4_1 + +class _Vec_short_4(_Matx_short_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_short_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_short_4_all(alpha) + + def mul(self, v): + return _SH._Vec_short_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_short_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_short_4_swiginit(self, _SH.new__Vec_short_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_short_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_short_4 + +# Register _Vec_short_4 in _SH: +_SH._Vec_short_4_swigregister(_Vec_short_4) + +def _Vec_short_4_all(alpha): + return _SH._Vec_short_4_all(alpha) + +class _DataType_Vec_short_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_short_4_generic_type + channels = _SH._DataType_Vec_short_4_channels + fmt = _SH._DataType_Vec_short_4_fmt + + def __init__(self): + _SH._DataType_Vec_short_4_swiginit(self, _SH.new__DataType_Vec_short_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_short_4 + +# Register _DataType_Vec_short_4 in _SH: +_SH._DataType_Vec_short_4_swigregister(_DataType_Vec_short_4) + + +Vec4s = _Vec_short_4 +DataType_Vec4s = _DataType_Vec_short_4 + +class _cv_numpy_sizeof_ushort(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_ushort_value + + def __init__(self): + _SH._cv_numpy_sizeof_ushort_swiginit(self, _SH.new__cv_numpy_sizeof_ushort()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_ushort + +# Register _cv_numpy_sizeof_ushort in _SH: +_SH._cv_numpy_sizeof_ushort_swigregister(_cv_numpy_sizeof_ushort) + + +if _cv_numpy_sizeof_ushort.value == 1: + _cv_numpy_typestr_map["ushort"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["ushort"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_ushort.value) + +class ushortArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.ushortArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.ushortArray___nonzero__(self) + + def __bool__(self): + return _SH.ushortArray___bool__(self) + + def __len__(self): + return _SH.ushortArray___len__(self) + + def __getslice__(self, i, j): + return _SH.ushortArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.ushortArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.ushortArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.ushortArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.ushortArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.ushortArray___setitem__(self, *args) + + def pop(self): + return _SH.ushortArray_pop(self) + + def append(self, x): + return _SH.ushortArray_append(self, x) + + def empty(self): + return _SH.ushortArray_empty(self) + + def size(self): + return _SH.ushortArray_size(self) + + def swap(self, v): + return _SH.ushortArray_swap(self, v) + + def begin(self): + return _SH.ushortArray_begin(self) + + def end(self): + return _SH.ushortArray_end(self) + + def rbegin(self): + return _SH.ushortArray_rbegin(self) + + def rend(self): + return _SH.ushortArray_rend(self) + + def clear(self): + return _SH.ushortArray_clear(self) + + def get_allocator(self): + return _SH.ushortArray_get_allocator(self) + + def pop_back(self): + return _SH.ushortArray_pop_back(self) + + def erase(self, *args): + return _SH.ushortArray_erase(self, *args) + + def __init__(self, *args): + _SH.ushortArray_swiginit(self, _SH.new_ushortArray(*args)) + + def push_back(self, x): + return _SH.ushortArray_push_back(self, x) + + def front(self): + return _SH.ushortArray_front(self) + + def back(self): + return _SH.ushortArray_back(self) + + def assign(self, n, x): + return _SH.ushortArray_assign(self, n, x) + + def resize(self, *args): + return _SH.ushortArray_resize(self, *args) + + def insert(self, *args): + return _SH.ushortArray_insert(self, *args) + + def reserve(self, n): + return _SH.ushortArray_reserve(self, n) + + def capacity(self): + return _SH.ushortArray_capacity(self) + __swig_destroy__ = _SH.delete_ushortArray + +# Register ushortArray in _SH: +_SH.ushortArray_swigregister(ushortArray) + + +_array_map["ushort"] =ushortArray + +class _Matx_ushort_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_ushort_2_1_rows + cols = _SH._Matx_ushort_2_1_cols + channels = _SH._Matx_ushort_2_1_channels + shortdim = _SH._Matx_ushort_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_ushort_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_ushort_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_ushort_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_ushort_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_ushort_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_ushort_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_ushort_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_ushort_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_ushort_2_1_t(self) + + def mul(self, a): + return _SH._Matx_ushort_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_ushort_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_ushort_2_1___call__(self, i, j) + val = property(_SH._Matx_ushort_2_1_val_get, _SH._Matx_ushort_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_ushort_2_1_swiginit(self, _SH.new__Matx_ushort_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_ushort_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_ushort_2_1 + +# Register _Matx_ushort_2_1 in _SH: +_SH._Matx_ushort_2_1_swigregister(_Matx_ushort_2_1) + +def _Matx_ushort_2_1_all(alpha): + return _SH._Matx_ushort_2_1_all(alpha) + +def _Matx_ushort_2_1_zeros(): + return _SH._Matx_ushort_2_1_zeros() + +def _Matx_ushort_2_1_ones(): + return _SH._Matx_ushort_2_1_ones() + +def _Matx_ushort_2_1_eye(): + return _SH._Matx_ushort_2_1_eye() + +def _Matx_ushort_2_1_randu(a, b): + return _SH._Matx_ushort_2_1_randu(a, b) + +def _Matx_ushort_2_1_randn(a, b): + return _SH._Matx_ushort_2_1_randn(a, b) + + +Matx21w = _Matx_ushort_2_1 + +class _Vec_ushort_2(_Matx_ushort_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_ushort_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_ushort_2_all(alpha) + + def mul(self, v): + return _SH._Vec_ushort_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_ushort_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_ushort_2_swiginit(self, _SH.new__Vec_ushort_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_ushort_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_ushort_2 + +# Register _Vec_ushort_2 in _SH: +_SH._Vec_ushort_2_swigregister(_Vec_ushort_2) + +def _Vec_ushort_2_all(alpha): + return _SH._Vec_ushort_2_all(alpha) + +class _DataType_Vec_ushort_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_ushort_2_generic_type + channels = _SH._DataType_Vec_ushort_2_channels + fmt = _SH._DataType_Vec_ushort_2_fmt + + def __init__(self): + _SH._DataType_Vec_ushort_2_swiginit(self, _SH.new__DataType_Vec_ushort_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_ushort_2 + +# Register _DataType_Vec_ushort_2 in _SH: +_SH._DataType_Vec_ushort_2_swigregister(_DataType_Vec_ushort_2) + + +Vec2w = _Vec_ushort_2 +DataType_Vec2w = _DataType_Vec_ushort_2 + +class _Matx_ushort_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_ushort_3_1_rows + cols = _SH._Matx_ushort_3_1_cols + channels = _SH._Matx_ushort_3_1_channels + shortdim = _SH._Matx_ushort_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_ushort_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_ushort_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_ushort_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_ushort_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_ushort_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_ushort_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_ushort_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_ushort_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_ushort_3_1_t(self) + + def mul(self, a): + return _SH._Matx_ushort_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_ushort_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_ushort_3_1___call__(self, i, j) + val = property(_SH._Matx_ushort_3_1_val_get, _SH._Matx_ushort_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_ushort_3_1_swiginit(self, _SH.new__Matx_ushort_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_ushort_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_ushort_3_1 + +# Register _Matx_ushort_3_1 in _SH: +_SH._Matx_ushort_3_1_swigregister(_Matx_ushort_3_1) + +def _Matx_ushort_3_1_all(alpha): + return _SH._Matx_ushort_3_1_all(alpha) + +def _Matx_ushort_3_1_zeros(): + return _SH._Matx_ushort_3_1_zeros() + +def _Matx_ushort_3_1_ones(): + return _SH._Matx_ushort_3_1_ones() + +def _Matx_ushort_3_1_eye(): + return _SH._Matx_ushort_3_1_eye() + +def _Matx_ushort_3_1_randu(a, b): + return _SH._Matx_ushort_3_1_randu(a, b) + +def _Matx_ushort_3_1_randn(a, b): + return _SH._Matx_ushort_3_1_randn(a, b) + + +Matx31w = _Matx_ushort_3_1 + +class _Vec_ushort_3(_Matx_ushort_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_ushort_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_ushort_3_all(alpha) + + def mul(self, v): + return _SH._Vec_ushort_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_ushort_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_ushort_3_swiginit(self, _SH.new__Vec_ushort_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_ushort_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_ushort_3 + +# Register _Vec_ushort_3 in _SH: +_SH._Vec_ushort_3_swigregister(_Vec_ushort_3) + +def _Vec_ushort_3_all(alpha): + return _SH._Vec_ushort_3_all(alpha) + +class _DataType_Vec_ushort_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_ushort_3_generic_type + channels = _SH._DataType_Vec_ushort_3_channels + fmt = _SH._DataType_Vec_ushort_3_fmt + + def __init__(self): + _SH._DataType_Vec_ushort_3_swiginit(self, _SH.new__DataType_Vec_ushort_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_ushort_3 + +# Register _DataType_Vec_ushort_3 in _SH: +_SH._DataType_Vec_ushort_3_swigregister(_DataType_Vec_ushort_3) + + +Vec3w = _Vec_ushort_3 +DataType_Vec3w = _DataType_Vec_ushort_3 + +class _Matx_ushort_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_ushort_4_1_rows + cols = _SH._Matx_ushort_4_1_cols + channels = _SH._Matx_ushort_4_1_channels + shortdim = _SH._Matx_ushort_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_ushort_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_ushort_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_ushort_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_ushort_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_ushort_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_ushort_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_ushort_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_ushort_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_ushort_4_1_t(self) + + def mul(self, a): + return _SH._Matx_ushort_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_ushort_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_ushort_4_1___call__(self, i, j) + val = property(_SH._Matx_ushort_4_1_val_get, _SH._Matx_ushort_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_ushort_4_1_swiginit(self, _SH.new__Matx_ushort_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_ushort_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_ushort_4_1 + +# Register _Matx_ushort_4_1 in _SH: +_SH._Matx_ushort_4_1_swigregister(_Matx_ushort_4_1) + +def _Matx_ushort_4_1_all(alpha): + return _SH._Matx_ushort_4_1_all(alpha) + +def _Matx_ushort_4_1_zeros(): + return _SH._Matx_ushort_4_1_zeros() + +def _Matx_ushort_4_1_ones(): + return _SH._Matx_ushort_4_1_ones() + +def _Matx_ushort_4_1_eye(): + return _SH._Matx_ushort_4_1_eye() + +def _Matx_ushort_4_1_randu(a, b): + return _SH._Matx_ushort_4_1_randu(a, b) + +def _Matx_ushort_4_1_randn(a, b): + return _SH._Matx_ushort_4_1_randn(a, b) + + +Matx41w = _Matx_ushort_4_1 + +class _Vec_ushort_4(_Matx_ushort_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_ushort_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_ushort_4_all(alpha) + + def mul(self, v): + return _SH._Vec_ushort_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_ushort_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_ushort_4_swiginit(self, _SH.new__Vec_ushort_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_ushort_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_ushort_4 + +# Register _Vec_ushort_4 in _SH: +_SH._Vec_ushort_4_swigregister(_Vec_ushort_4) + +def _Vec_ushort_4_all(alpha): + return _SH._Vec_ushort_4_all(alpha) + +class _DataType_Vec_ushort_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_ushort_4_generic_type + channels = _SH._DataType_Vec_ushort_4_channels + fmt = _SH._DataType_Vec_ushort_4_fmt + + def __init__(self): + _SH._DataType_Vec_ushort_4_swiginit(self, _SH.new__DataType_Vec_ushort_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_ushort_4 + +# Register _DataType_Vec_ushort_4 in _SH: +_SH._DataType_Vec_ushort_4_swigregister(_DataType_Vec_ushort_4) + + +Vec4w = _Vec_ushort_4 +DataType_Vec4w = _DataType_Vec_ushort_4 + +class _cv_numpy_sizeof_int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_int_value + + def __init__(self): + _SH._cv_numpy_sizeof_int_swiginit(self, _SH.new__cv_numpy_sizeof_int()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_int + +# Register _cv_numpy_sizeof_int in _SH: +_SH._cv_numpy_sizeof_int_swigregister(_cv_numpy_sizeof_int) + + +if _cv_numpy_sizeof_int.value == 1: + _cv_numpy_typestr_map["int"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["int"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_int.value) + +class intArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.intArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.intArray___nonzero__(self) + + def __bool__(self): + return _SH.intArray___bool__(self) + + def __len__(self): + return _SH.intArray___len__(self) + + def __getslice__(self, i, j): + return _SH.intArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.intArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.intArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.intArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.intArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.intArray___setitem__(self, *args) + + def pop(self): + return _SH.intArray_pop(self) + + def append(self, x): + return _SH.intArray_append(self, x) + + def empty(self): + return _SH.intArray_empty(self) + + def size(self): + return _SH.intArray_size(self) + + def swap(self, v): + return _SH.intArray_swap(self, v) + + def begin(self): + return _SH.intArray_begin(self) + + def end(self): + return _SH.intArray_end(self) + + def rbegin(self): + return _SH.intArray_rbegin(self) + + def rend(self): + return _SH.intArray_rend(self) + + def clear(self): + return _SH.intArray_clear(self) + + def get_allocator(self): + return _SH.intArray_get_allocator(self) + + def pop_back(self): + return _SH.intArray_pop_back(self) + + def erase(self, *args): + return _SH.intArray_erase(self, *args) + + def __init__(self, *args): + _SH.intArray_swiginit(self, _SH.new_intArray(*args)) + + def push_back(self, x): + return _SH.intArray_push_back(self, x) + + def front(self): + return _SH.intArray_front(self) + + def back(self): + return _SH.intArray_back(self) + + def assign(self, n, x): + return _SH.intArray_assign(self, n, x) + + def resize(self, *args): + return _SH.intArray_resize(self, *args) + + def insert(self, *args): + return _SH.intArray_insert(self, *args) + + def reserve(self, n): + return _SH.intArray_reserve(self, n) + + def capacity(self): + return _SH.intArray_capacity(self) + __swig_destroy__ = _SH.delete_intArray + +# Register intArray in _SH: +_SH.intArray_swigregister(intArray) + + +_array_map["int"] =intArray + +class _Matx_int_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_2_1_rows + cols = _SH._Matx_int_2_1_cols + channels = _SH._Matx_int_2_1_channels + shortdim = _SH._Matx_int_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_2_1_t(self) + + def mul(self, a): + return _SH._Matx_int_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_2_1___call__(self, i, j) + val = property(_SH._Matx_int_2_1_val_get, _SH._Matx_int_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_2_1_swiginit(self, _SH.new__Matx_int_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_2_1 + +# Register _Matx_int_2_1 in _SH: +_SH._Matx_int_2_1_swigregister(_Matx_int_2_1) + +def _Matx_int_2_1_all(alpha): + return _SH._Matx_int_2_1_all(alpha) + +def _Matx_int_2_1_zeros(): + return _SH._Matx_int_2_1_zeros() + +def _Matx_int_2_1_ones(): + return _SH._Matx_int_2_1_ones() + +def _Matx_int_2_1_eye(): + return _SH._Matx_int_2_1_eye() + +def _Matx_int_2_1_randu(a, b): + return _SH._Matx_int_2_1_randu(a, b) + +def _Matx_int_2_1_randn(a, b): + return _SH._Matx_int_2_1_randn(a, b) + + +Matx21i = _Matx_int_2_1 + +class _Vec_int_2(_Matx_int_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_2_all(alpha) + + def mul(self, v): + return _SH._Vec_int_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_2_swiginit(self, _SH.new__Vec_int_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_2 + +# Register _Vec_int_2 in _SH: +_SH._Vec_int_2_swigregister(_Vec_int_2) + +def _Vec_int_2_all(alpha): + return _SH._Vec_int_2_all(alpha) + +class _DataType_Vec_int_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_2_generic_type + channels = _SH._DataType_Vec_int_2_channels + fmt = _SH._DataType_Vec_int_2_fmt + + def __init__(self): + _SH._DataType_Vec_int_2_swiginit(self, _SH.new__DataType_Vec_int_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_2 + +# Register _DataType_Vec_int_2 in _SH: +_SH._DataType_Vec_int_2_swigregister(_DataType_Vec_int_2) + + +Vec2i = _Vec_int_2 +DataType_Vec2i = _DataType_Vec_int_2 + +class _Matx_int_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_3_1_rows + cols = _SH._Matx_int_3_1_cols + channels = _SH._Matx_int_3_1_channels + shortdim = _SH._Matx_int_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_3_1_t(self) + + def mul(self, a): + return _SH._Matx_int_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_3_1___call__(self, i, j) + val = property(_SH._Matx_int_3_1_val_get, _SH._Matx_int_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_3_1_swiginit(self, _SH.new__Matx_int_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_3_1 + +# Register _Matx_int_3_1 in _SH: +_SH._Matx_int_3_1_swigregister(_Matx_int_3_1) + +def _Matx_int_3_1_all(alpha): + return _SH._Matx_int_3_1_all(alpha) + +def _Matx_int_3_1_zeros(): + return _SH._Matx_int_3_1_zeros() + +def _Matx_int_3_1_ones(): + return _SH._Matx_int_3_1_ones() + +def _Matx_int_3_1_eye(): + return _SH._Matx_int_3_1_eye() + +def _Matx_int_3_1_randu(a, b): + return _SH._Matx_int_3_1_randu(a, b) + +def _Matx_int_3_1_randn(a, b): + return _SH._Matx_int_3_1_randn(a, b) + + +Matx31i = _Matx_int_3_1 + +class _Vec_int_3(_Matx_int_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_3_all(alpha) + + def mul(self, v): + return _SH._Vec_int_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_3_swiginit(self, _SH.new__Vec_int_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_3 + +# Register _Vec_int_3 in _SH: +_SH._Vec_int_3_swigregister(_Vec_int_3) + +def _Vec_int_3_all(alpha): + return _SH._Vec_int_3_all(alpha) + +class _DataType_Vec_int_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_3_generic_type + channels = _SH._DataType_Vec_int_3_channels + fmt = _SH._DataType_Vec_int_3_fmt + + def __init__(self): + _SH._DataType_Vec_int_3_swiginit(self, _SH.new__DataType_Vec_int_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_3 + +# Register _DataType_Vec_int_3 in _SH: +_SH._DataType_Vec_int_3_swigregister(_DataType_Vec_int_3) + + +Vec3i = _Vec_int_3 +DataType_Vec3i = _DataType_Vec_int_3 + +class _Matx_int_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_4_1_rows + cols = _SH._Matx_int_4_1_cols + channels = _SH._Matx_int_4_1_channels + shortdim = _SH._Matx_int_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_4_1_t(self) + + def mul(self, a): + return _SH._Matx_int_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_4_1___call__(self, i, j) + val = property(_SH._Matx_int_4_1_val_get, _SH._Matx_int_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_4_1_swiginit(self, _SH.new__Matx_int_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_4_1 + +# Register _Matx_int_4_1 in _SH: +_SH._Matx_int_4_1_swigregister(_Matx_int_4_1) + +def _Matx_int_4_1_all(alpha): + return _SH._Matx_int_4_1_all(alpha) + +def _Matx_int_4_1_zeros(): + return _SH._Matx_int_4_1_zeros() + +def _Matx_int_4_1_ones(): + return _SH._Matx_int_4_1_ones() + +def _Matx_int_4_1_eye(): + return _SH._Matx_int_4_1_eye() + +def _Matx_int_4_1_randu(a, b): + return _SH._Matx_int_4_1_randu(a, b) + +def _Matx_int_4_1_randn(a, b): + return _SH._Matx_int_4_1_randn(a, b) + + +Matx41i = _Matx_int_4_1 + +class _Vec_int_4(_Matx_int_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_4_all(alpha) + + def mul(self, v): + return _SH._Vec_int_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_4_swiginit(self, _SH.new__Vec_int_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_4 + +# Register _Vec_int_4 in _SH: +_SH._Vec_int_4_swigregister(_Vec_int_4) + +def _Vec_int_4_all(alpha): + return _SH._Vec_int_4_all(alpha) + +class _DataType_Vec_int_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_4_generic_type + channels = _SH._DataType_Vec_int_4_channels + fmt = _SH._DataType_Vec_int_4_fmt + + def __init__(self): + _SH._DataType_Vec_int_4_swiginit(self, _SH.new__DataType_Vec_int_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_4 + +# Register _DataType_Vec_int_4 in _SH: +_SH._DataType_Vec_int_4_swigregister(_DataType_Vec_int_4) + + +Vec4i = _Vec_int_4 +DataType_Vec4i = _DataType_Vec_int_4 + +class _Matx_int_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_6_1_rows + cols = _SH._Matx_int_6_1_cols + channels = _SH._Matx_int_6_1_channels + shortdim = _SH._Matx_int_6_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_6_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_6_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_6_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_6_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_6_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_6_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_6_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_6_1_t(self) + + def mul(self, a): + return _SH._Matx_int_6_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_6_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_6_1___call__(self, i, j) + val = property(_SH._Matx_int_6_1_val_get, _SH._Matx_int_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_6_1_swiginit(self, _SH.new__Matx_int_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_6_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_6_1 + +# Register _Matx_int_6_1 in _SH: +_SH._Matx_int_6_1_swigregister(_Matx_int_6_1) + +def _Matx_int_6_1_all(alpha): + return _SH._Matx_int_6_1_all(alpha) + +def _Matx_int_6_1_zeros(): + return _SH._Matx_int_6_1_zeros() + +def _Matx_int_6_1_ones(): + return _SH._Matx_int_6_1_ones() + +def _Matx_int_6_1_eye(): + return _SH._Matx_int_6_1_eye() + +def _Matx_int_6_1_randu(a, b): + return _SH._Matx_int_6_1_randu(a, b) + +def _Matx_int_6_1_randn(a, b): + return _SH._Matx_int_6_1_randn(a, b) + + +Matx61i = _Matx_int_6_1 + +class _Vec_int_6(_Matx_int_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_6_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_6_all(alpha) + + def mul(self, v): + return _SH._Vec_int_6_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_6_swiginit(self, _SH.new__Vec_int_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_6___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_6 + +# Register _Vec_int_6 in _SH: +_SH._Vec_int_6_swigregister(_Vec_int_6) + +def _Vec_int_6_all(alpha): + return _SH._Vec_int_6_all(alpha) + +class _DataType_Vec_int_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_6_generic_type + channels = _SH._DataType_Vec_int_6_channels + fmt = _SH._DataType_Vec_int_6_fmt + + def __init__(self): + _SH._DataType_Vec_int_6_swiginit(self, _SH.new__DataType_Vec_int_6()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_6 + +# Register _DataType_Vec_int_6 in _SH: +_SH._DataType_Vec_int_6_swigregister(_DataType_Vec_int_6) + + +Vec6i = _Vec_int_6 +DataType_Vec6i = _DataType_Vec_int_6 + +class _Matx_int_8_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_int_8_1_rows + cols = _SH._Matx_int_8_1_cols + channels = _SH._Matx_int_8_1_channels + shortdim = _SH._Matx_int_8_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_int_8_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_int_8_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_int_8_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_int_8_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_int_8_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_int_8_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_int_8_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_int_8_1_ddot(self, v) + + def t(self): + return _SH._Matx_int_8_1_t(self) + + def mul(self, a): + return _SH._Matx_int_8_1_mul(self, a) + + def div(self, a): + return _SH._Matx_int_8_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_int_8_1___call__(self, i, j) + val = property(_SH._Matx_int_8_1_val_get, _SH._Matx_int_8_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_int_8_1_swiginit(self, _SH.new__Matx_int_8_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_int_8_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_int_8_1 + +# Register _Matx_int_8_1 in _SH: +_SH._Matx_int_8_1_swigregister(_Matx_int_8_1) + +def _Matx_int_8_1_all(alpha): + return _SH._Matx_int_8_1_all(alpha) + +def _Matx_int_8_1_zeros(): + return _SH._Matx_int_8_1_zeros() + +def _Matx_int_8_1_ones(): + return _SH._Matx_int_8_1_ones() + +def _Matx_int_8_1_eye(): + return _SH._Matx_int_8_1_eye() + +def _Matx_int_8_1_randu(a, b): + return _SH._Matx_int_8_1_randu(a, b) + +def _Matx_int_8_1_randn(a, b): + return _SH._Matx_int_8_1_randn(a, b) + + +Matx81i = _Matx_int_8_1 + +class _Vec_int_8(_Matx_int_8_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_int_8_channels + + @staticmethod + def all(alpha): + return _SH._Vec_int_8_all(alpha) + + def mul(self, v): + return _SH._Vec_int_8_mul(self, v) + + def __call__(self, i): + return _SH._Vec_int_8___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_int_8_swiginit(self, _SH.new__Vec_int_8(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_int_8___str__(self) + __swig_destroy__ = _SH.delete__Vec_int_8 + +# Register _Vec_int_8 in _SH: +_SH._Vec_int_8_swigregister(_Vec_int_8) + +def _Vec_int_8_all(alpha): + return _SH._Vec_int_8_all(alpha) + +class _DataType_Vec_int_8(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_int_8_generic_type + channels = _SH._DataType_Vec_int_8_channels + fmt = _SH._DataType_Vec_int_8_fmt + + def __init__(self): + _SH._DataType_Vec_int_8_swiginit(self, _SH.new__DataType_Vec_int_8()) + __swig_destroy__ = _SH.delete__DataType_Vec_int_8 + +# Register _DataType_Vec_int_8 in _SH: +_SH._DataType_Vec_int_8_swigregister(_DataType_Vec_int_8) + + +Vec8i = _Vec_int_8 +DataType_Vec8i = _DataType_Vec_int_8 + +class _cv_numpy_sizeof_float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_float_value + + def __init__(self): + _SH._cv_numpy_sizeof_float_swiginit(self, _SH.new__cv_numpy_sizeof_float()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_float + +# Register _cv_numpy_sizeof_float in _SH: +_SH._cv_numpy_sizeof_float_swigregister(_cv_numpy_sizeof_float) + + +if _cv_numpy_sizeof_float.value == 1: + _cv_numpy_typestr_map["float"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["float"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_float.value) + +class floatArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.floatArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.floatArray___nonzero__(self) + + def __bool__(self): + return _SH.floatArray___bool__(self) + + def __len__(self): + return _SH.floatArray___len__(self) + + def __getslice__(self, i, j): + return _SH.floatArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.floatArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.floatArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.floatArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.floatArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.floatArray___setitem__(self, *args) + + def pop(self): + return _SH.floatArray_pop(self) + + def append(self, x): + return _SH.floatArray_append(self, x) + + def empty(self): + return _SH.floatArray_empty(self) + + def size(self): + return _SH.floatArray_size(self) + + def swap(self, v): + return _SH.floatArray_swap(self, v) + + def begin(self): + return _SH.floatArray_begin(self) + + def end(self): + return _SH.floatArray_end(self) + + def rbegin(self): + return _SH.floatArray_rbegin(self) + + def rend(self): + return _SH.floatArray_rend(self) + + def clear(self): + return _SH.floatArray_clear(self) + + def get_allocator(self): + return _SH.floatArray_get_allocator(self) + + def pop_back(self): + return _SH.floatArray_pop_back(self) + + def erase(self, *args): + return _SH.floatArray_erase(self, *args) + + def __init__(self, *args): + _SH.floatArray_swiginit(self, _SH.new_floatArray(*args)) + + def push_back(self, x): + return _SH.floatArray_push_back(self, x) + + def front(self): + return _SH.floatArray_front(self) + + def back(self): + return _SH.floatArray_back(self) + + def assign(self, n, x): + return _SH.floatArray_assign(self, n, x) + + def resize(self, *args): + return _SH.floatArray_resize(self, *args) + + def insert(self, *args): + return _SH.floatArray_insert(self, *args) + + def reserve(self, n): + return _SH.floatArray_reserve(self, n) + + def capacity(self): + return _SH.floatArray_capacity(self) + __swig_destroy__ = _SH.delete_floatArray + +# Register floatArray in _SH: +_SH.floatArray_swigregister(floatArray) + + +_array_map["float"] =floatArray + +class _Matx_float_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_2_1_rows + cols = _SH._Matx_float_2_1_cols + channels = _SH._Matx_float_2_1_channels + shortdim = _SH._Matx_float_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_float_2_1_t(self) + + def mul(self, a): + return _SH._Matx_float_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_float_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_2_1___call__(self, i, j) + val = property(_SH._Matx_float_2_1_val_get, _SH._Matx_float_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_2_1_swiginit(self, _SH.new__Matx_float_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_2_1 + +# Register _Matx_float_2_1 in _SH: +_SH._Matx_float_2_1_swigregister(_Matx_float_2_1) + +def _Matx_float_2_1_all(alpha): + return _SH._Matx_float_2_1_all(alpha) + +def _Matx_float_2_1_zeros(): + return _SH._Matx_float_2_1_zeros() + +def _Matx_float_2_1_ones(): + return _SH._Matx_float_2_1_ones() + +def _Matx_float_2_1_eye(): + return _SH._Matx_float_2_1_eye() + +def _Matx_float_2_1_randu(a, b): + return _SH._Matx_float_2_1_randu(a, b) + +def _Matx_float_2_1_randn(a, b): + return _SH._Matx_float_2_1_randn(a, b) + + +Matx21f = _Matx_float_2_1 + +class _Vec_float_2(_Matx_float_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_float_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_float_2_all(alpha) + + def mul(self, v): + return _SH._Vec_float_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_float_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_float_2_swiginit(self, _SH.new__Vec_float_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_float_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_float_2 + +# Register _Vec_float_2 in _SH: +_SH._Vec_float_2_swigregister(_Vec_float_2) + +def _Vec_float_2_all(alpha): + return _SH._Vec_float_2_all(alpha) + +class _DataType_Vec_float_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_float_2_generic_type + channels = _SH._DataType_Vec_float_2_channels + fmt = _SH._DataType_Vec_float_2_fmt + + def __init__(self): + _SH._DataType_Vec_float_2_swiginit(self, _SH.new__DataType_Vec_float_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_float_2 + +# Register _DataType_Vec_float_2 in _SH: +_SH._DataType_Vec_float_2_swigregister(_DataType_Vec_float_2) + + +Vec2f = _Vec_float_2 +DataType_Vec2f = _DataType_Vec_float_2 + +class _Matx_float_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_3_1_rows + cols = _SH._Matx_float_3_1_cols + channels = _SH._Matx_float_3_1_channels + shortdim = _SH._Matx_float_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_float_3_1_t(self) + + def mul(self, a): + return _SH._Matx_float_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_float_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_3_1___call__(self, i, j) + val = property(_SH._Matx_float_3_1_val_get, _SH._Matx_float_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_3_1_swiginit(self, _SH.new__Matx_float_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_3_1 + +# Register _Matx_float_3_1 in _SH: +_SH._Matx_float_3_1_swigregister(_Matx_float_3_1) + +def _Matx_float_3_1_all(alpha): + return _SH._Matx_float_3_1_all(alpha) + +def _Matx_float_3_1_zeros(): + return _SH._Matx_float_3_1_zeros() + +def _Matx_float_3_1_ones(): + return _SH._Matx_float_3_1_ones() + +def _Matx_float_3_1_eye(): + return _SH._Matx_float_3_1_eye() + +def _Matx_float_3_1_randu(a, b): + return _SH._Matx_float_3_1_randu(a, b) + +def _Matx_float_3_1_randn(a, b): + return _SH._Matx_float_3_1_randn(a, b) + + +Matx31f = _Matx_float_3_1 + +class _Vec_float_3(_Matx_float_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_float_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_float_3_all(alpha) + + def mul(self, v): + return _SH._Vec_float_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_float_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_float_3_swiginit(self, _SH.new__Vec_float_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_float_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_float_3 + +# Register _Vec_float_3 in _SH: +_SH._Vec_float_3_swigregister(_Vec_float_3) + +def _Vec_float_3_all(alpha): + return _SH._Vec_float_3_all(alpha) + +class _DataType_Vec_float_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_float_3_generic_type + channels = _SH._DataType_Vec_float_3_channels + fmt = _SH._DataType_Vec_float_3_fmt + + def __init__(self): + _SH._DataType_Vec_float_3_swiginit(self, _SH.new__DataType_Vec_float_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_float_3 + +# Register _DataType_Vec_float_3 in _SH: +_SH._DataType_Vec_float_3_swigregister(_DataType_Vec_float_3) + + +Vec3f = _Vec_float_3 +DataType_Vec3f = _DataType_Vec_float_3 + +class _Matx_float_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_4_1_rows + cols = _SH._Matx_float_4_1_cols + channels = _SH._Matx_float_4_1_channels + shortdim = _SH._Matx_float_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_float_4_1_t(self) + + def mul(self, a): + return _SH._Matx_float_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_float_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_4_1___call__(self, i, j) + val = property(_SH._Matx_float_4_1_val_get, _SH._Matx_float_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_4_1_swiginit(self, _SH.new__Matx_float_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_4_1 + +# Register _Matx_float_4_1 in _SH: +_SH._Matx_float_4_1_swigregister(_Matx_float_4_1) + +def _Matx_float_4_1_all(alpha): + return _SH._Matx_float_4_1_all(alpha) + +def _Matx_float_4_1_zeros(): + return _SH._Matx_float_4_1_zeros() + +def _Matx_float_4_1_ones(): + return _SH._Matx_float_4_1_ones() + +def _Matx_float_4_1_eye(): + return _SH._Matx_float_4_1_eye() + +def _Matx_float_4_1_randu(a, b): + return _SH._Matx_float_4_1_randu(a, b) + +def _Matx_float_4_1_randn(a, b): + return _SH._Matx_float_4_1_randn(a, b) + + +Matx41f = _Matx_float_4_1 + +class _Vec_float_4(_Matx_float_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_float_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_float_4_all(alpha) + + def mul(self, v): + return _SH._Vec_float_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_float_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_float_4_swiginit(self, _SH.new__Vec_float_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_float_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_float_4 + +# Register _Vec_float_4 in _SH: +_SH._Vec_float_4_swigregister(_Vec_float_4) + +def _Vec_float_4_all(alpha): + return _SH._Vec_float_4_all(alpha) + +class _DataType_Vec_float_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_float_4_generic_type + channels = _SH._DataType_Vec_float_4_channels + fmt = _SH._DataType_Vec_float_4_fmt + + def __init__(self): + _SH._DataType_Vec_float_4_swiginit(self, _SH.new__DataType_Vec_float_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_float_4 + +# Register _DataType_Vec_float_4 in _SH: +_SH._DataType_Vec_float_4_swigregister(_DataType_Vec_float_4) + + +Vec4f = _Vec_float_4 +DataType_Vec4f = _DataType_Vec_float_4 + +class _Matx_float_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_6_1_rows + cols = _SH._Matx_float_6_1_cols + channels = _SH._Matx_float_6_1_channels + shortdim = _SH._Matx_float_6_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_6_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_6_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_6_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_6_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_6_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_6_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_6_1_ddot(self, v) + + def t(self): + return _SH._Matx_float_6_1_t(self) + + def mul(self, a): + return _SH._Matx_float_6_1_mul(self, a) + + def div(self, a): + return _SH._Matx_float_6_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_6_1___call__(self, i, j) + val = property(_SH._Matx_float_6_1_val_get, _SH._Matx_float_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_6_1_swiginit(self, _SH.new__Matx_float_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_6_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_6_1 + +# Register _Matx_float_6_1 in _SH: +_SH._Matx_float_6_1_swigregister(_Matx_float_6_1) + +def _Matx_float_6_1_all(alpha): + return _SH._Matx_float_6_1_all(alpha) + +def _Matx_float_6_1_zeros(): + return _SH._Matx_float_6_1_zeros() + +def _Matx_float_6_1_ones(): + return _SH._Matx_float_6_1_ones() + +def _Matx_float_6_1_eye(): + return _SH._Matx_float_6_1_eye() + +def _Matx_float_6_1_randu(a, b): + return _SH._Matx_float_6_1_randu(a, b) + +def _Matx_float_6_1_randn(a, b): + return _SH._Matx_float_6_1_randn(a, b) + + +Matx61f = _Matx_float_6_1 + +class _Vec_float_6(_Matx_float_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_float_6_channels + + @staticmethod + def all(alpha): + return _SH._Vec_float_6_all(alpha) + + def mul(self, v): + return _SH._Vec_float_6_mul(self, v) + + def __call__(self, i): + return _SH._Vec_float_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_float_6_swiginit(self, _SH.new__Vec_float_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_float_6___str__(self) + __swig_destroy__ = _SH.delete__Vec_float_6 + +# Register _Vec_float_6 in _SH: +_SH._Vec_float_6_swigregister(_Vec_float_6) + +def _Vec_float_6_all(alpha): + return _SH._Vec_float_6_all(alpha) + +class _DataType_Vec_float_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_float_6_generic_type + channels = _SH._DataType_Vec_float_6_channels + fmt = _SH._DataType_Vec_float_6_fmt + + def __init__(self): + _SH._DataType_Vec_float_6_swiginit(self, _SH.new__DataType_Vec_float_6()) + __swig_destroy__ = _SH.delete__DataType_Vec_float_6 + +# Register _DataType_Vec_float_6 in _SH: +_SH._DataType_Vec_float_6_swigregister(_DataType_Vec_float_6) + + +Vec6f = _Vec_float_6 +DataType_Vec6f = _DataType_Vec_float_6 + +class _cv_numpy_sizeof_double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_double_value + + def __init__(self): + _SH._cv_numpy_sizeof_double_swiginit(self, _SH.new__cv_numpy_sizeof_double()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_double + +# Register _cv_numpy_sizeof_double in _SH: +_SH._cv_numpy_sizeof_double_swigregister(_cv_numpy_sizeof_double) + + +if _cv_numpy_sizeof_double.value == 1: + _cv_numpy_typestr_map["double"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["double"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_double.value) + +class doubleArray(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def iterator(self): + return _SH.doubleArray_iterator(self) + def __iter__(self): + return self.iterator() + + def __nonzero__(self): + return _SH.doubleArray___nonzero__(self) + + def __bool__(self): + return _SH.doubleArray___bool__(self) + + def __len__(self): + return _SH.doubleArray___len__(self) + + def __getslice__(self, i, j): + return _SH.doubleArray___getslice__(self, i, j) + + def __setslice__(self, *args): + return _SH.doubleArray___setslice__(self, *args) + + def __delslice__(self, i, j): + return _SH.doubleArray___delslice__(self, i, j) + + def __delitem__(self, *args): + return _SH.doubleArray___delitem__(self, *args) + + def __getitem__(self, *args): + return _SH.doubleArray___getitem__(self, *args) + + def __setitem__(self, *args): + return _SH.doubleArray___setitem__(self, *args) + + def pop(self): + return _SH.doubleArray_pop(self) + + def append(self, x): + return _SH.doubleArray_append(self, x) + + def empty(self): + return _SH.doubleArray_empty(self) + + def size(self): + return _SH.doubleArray_size(self) + + def swap(self, v): + return _SH.doubleArray_swap(self, v) + + def begin(self): + return _SH.doubleArray_begin(self) + + def end(self): + return _SH.doubleArray_end(self) + + def rbegin(self): + return _SH.doubleArray_rbegin(self) + + def rend(self): + return _SH.doubleArray_rend(self) + + def clear(self): + return _SH.doubleArray_clear(self) + + def get_allocator(self): + return _SH.doubleArray_get_allocator(self) + + def pop_back(self): + return _SH.doubleArray_pop_back(self) + + def erase(self, *args): + return _SH.doubleArray_erase(self, *args) + + def __init__(self, *args): + _SH.doubleArray_swiginit(self, _SH.new_doubleArray(*args)) + + def push_back(self, x): + return _SH.doubleArray_push_back(self, x) + + def front(self): + return _SH.doubleArray_front(self) + + def back(self): + return _SH.doubleArray_back(self) + + def assign(self, n, x): + return _SH.doubleArray_assign(self, n, x) + + def resize(self, *args): + return _SH.doubleArray_resize(self, *args) + + def insert(self, *args): + return _SH.doubleArray_insert(self, *args) + + def reserve(self, n): + return _SH.doubleArray_reserve(self, n) + + def capacity(self): + return _SH.doubleArray_capacity(self) + __swig_destroy__ = _SH.delete_doubleArray + +# Register doubleArray in _SH: +_SH.doubleArray_swigregister(doubleArray) + + +_array_map["double"] =doubleArray + +class _Matx_double_2_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_2_1_rows + cols = _SH._Matx_double_2_1_cols + channels = _SH._Matx_double_2_1_channels + shortdim = _SH._Matx_double_2_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_2_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_2_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_2_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_2_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_2_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_2_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_2_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_2_1_ddot(self, v) + + def t(self): + return _SH._Matx_double_2_1_t(self) + + def mul(self, a): + return _SH._Matx_double_2_1_mul(self, a) + + def div(self, a): + return _SH._Matx_double_2_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_2_1___call__(self, i, j) + val = property(_SH._Matx_double_2_1_val_get, _SH._Matx_double_2_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_2_1_swiginit(self, _SH.new__Matx_double_2_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_2_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_2_1 + +# Register _Matx_double_2_1 in _SH: +_SH._Matx_double_2_1_swigregister(_Matx_double_2_1) + +def _Matx_double_2_1_all(alpha): + return _SH._Matx_double_2_1_all(alpha) + +def _Matx_double_2_1_zeros(): + return _SH._Matx_double_2_1_zeros() + +def _Matx_double_2_1_ones(): + return _SH._Matx_double_2_1_ones() + +def _Matx_double_2_1_eye(): + return _SH._Matx_double_2_1_eye() + +def _Matx_double_2_1_randu(a, b): + return _SH._Matx_double_2_1_randu(a, b) + +def _Matx_double_2_1_randn(a, b): + return _SH._Matx_double_2_1_randn(a, b) + + +Matx21d = _Matx_double_2_1 + +class _Vec_double_2(_Matx_double_2_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_double_2_channels + + @staticmethod + def all(alpha): + return _SH._Vec_double_2_all(alpha) + + def mul(self, v): + return _SH._Vec_double_2_mul(self, v) + + def __call__(self, i): + return _SH._Vec_double_2___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_double_2_swiginit(self, _SH.new__Vec_double_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_double_2___str__(self) + __swig_destroy__ = _SH.delete__Vec_double_2 + +# Register _Vec_double_2 in _SH: +_SH._Vec_double_2_swigregister(_Vec_double_2) + +def _Vec_double_2_all(alpha): + return _SH._Vec_double_2_all(alpha) + +class _DataType_Vec_double_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_double_2_generic_type + channels = _SH._DataType_Vec_double_2_channels + fmt = _SH._DataType_Vec_double_2_fmt + + def __init__(self): + _SH._DataType_Vec_double_2_swiginit(self, _SH.new__DataType_Vec_double_2()) + __swig_destroy__ = _SH.delete__DataType_Vec_double_2 + +# Register _DataType_Vec_double_2 in _SH: +_SH._DataType_Vec_double_2_swigregister(_DataType_Vec_double_2) + + +Vec2d = _Vec_double_2 +DataType_Vec2d = _DataType_Vec_double_2 + +class _Matx_double_3_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_3_1_rows + cols = _SH._Matx_double_3_1_cols + channels = _SH._Matx_double_3_1_channels + shortdim = _SH._Matx_double_3_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_3_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_3_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_3_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_3_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_3_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_3_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_3_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_3_1_ddot(self, v) + + def t(self): + return _SH._Matx_double_3_1_t(self) + + def mul(self, a): + return _SH._Matx_double_3_1_mul(self, a) + + def div(self, a): + return _SH._Matx_double_3_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_3_1___call__(self, i, j) + val = property(_SH._Matx_double_3_1_val_get, _SH._Matx_double_3_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_3_1_swiginit(self, _SH.new__Matx_double_3_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_3_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_3_1 + +# Register _Matx_double_3_1 in _SH: +_SH._Matx_double_3_1_swigregister(_Matx_double_3_1) + +def _Matx_double_3_1_all(alpha): + return _SH._Matx_double_3_1_all(alpha) + +def _Matx_double_3_1_zeros(): + return _SH._Matx_double_3_1_zeros() + +def _Matx_double_3_1_ones(): + return _SH._Matx_double_3_1_ones() + +def _Matx_double_3_1_eye(): + return _SH._Matx_double_3_1_eye() + +def _Matx_double_3_1_randu(a, b): + return _SH._Matx_double_3_1_randu(a, b) + +def _Matx_double_3_1_randn(a, b): + return _SH._Matx_double_3_1_randn(a, b) + + +Matx31d = _Matx_double_3_1 + +class _Vec_double_3(_Matx_double_3_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_double_3_channels + + @staticmethod + def all(alpha): + return _SH._Vec_double_3_all(alpha) + + def mul(self, v): + return _SH._Vec_double_3_mul(self, v) + + def __call__(self, i): + return _SH._Vec_double_3___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_double_3_swiginit(self, _SH.new__Vec_double_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_double_3___str__(self) + __swig_destroy__ = _SH.delete__Vec_double_3 + +# Register _Vec_double_3 in _SH: +_SH._Vec_double_3_swigregister(_Vec_double_3) + +def _Vec_double_3_all(alpha): + return _SH._Vec_double_3_all(alpha) + +class _DataType_Vec_double_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_double_3_generic_type + channels = _SH._DataType_Vec_double_3_channels + fmt = _SH._DataType_Vec_double_3_fmt + + def __init__(self): + _SH._DataType_Vec_double_3_swiginit(self, _SH.new__DataType_Vec_double_3()) + __swig_destroy__ = _SH.delete__DataType_Vec_double_3 + +# Register _DataType_Vec_double_3 in _SH: +_SH._DataType_Vec_double_3_swigregister(_DataType_Vec_double_3) + + +Vec3d = _Vec_double_3 +DataType_Vec3d = _DataType_Vec_double_3 + +class _Matx_double_4_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_4_1_rows + cols = _SH._Matx_double_4_1_cols + channels = _SH._Matx_double_4_1_channels + shortdim = _SH._Matx_double_4_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_4_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_4_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_4_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_4_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_4_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_4_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_4_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_4_1_ddot(self, v) + + def t(self): + return _SH._Matx_double_4_1_t(self) + + def mul(self, a): + return _SH._Matx_double_4_1_mul(self, a) + + def div(self, a): + return _SH._Matx_double_4_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_4_1___call__(self, i, j) + val = property(_SH._Matx_double_4_1_val_get, _SH._Matx_double_4_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_4_1_swiginit(self, _SH.new__Matx_double_4_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_4_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_4_1 + +# Register _Matx_double_4_1 in _SH: +_SH._Matx_double_4_1_swigregister(_Matx_double_4_1) + +def _Matx_double_4_1_all(alpha): + return _SH._Matx_double_4_1_all(alpha) + +def _Matx_double_4_1_zeros(): + return _SH._Matx_double_4_1_zeros() + +def _Matx_double_4_1_ones(): + return _SH._Matx_double_4_1_ones() + +def _Matx_double_4_1_eye(): + return _SH._Matx_double_4_1_eye() + +def _Matx_double_4_1_randu(a, b): + return _SH._Matx_double_4_1_randu(a, b) + +def _Matx_double_4_1_randn(a, b): + return _SH._Matx_double_4_1_randn(a, b) + + +Matx41d = _Matx_double_4_1 + +class _Vec_double_4(_Matx_double_4_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_double_4_channels + + @staticmethod + def all(alpha): + return _SH._Vec_double_4_all(alpha) + + def mul(self, v): + return _SH._Vec_double_4_mul(self, v) + + def __call__(self, i): + return _SH._Vec_double_4___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_double_4_swiginit(self, _SH.new__Vec_double_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_double_4___str__(self) + __swig_destroy__ = _SH.delete__Vec_double_4 + +# Register _Vec_double_4 in _SH: +_SH._Vec_double_4_swigregister(_Vec_double_4) + +def _Vec_double_4_all(alpha): + return _SH._Vec_double_4_all(alpha) + +class _DataType_Vec_double_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_double_4_generic_type + channels = _SH._DataType_Vec_double_4_channels + fmt = _SH._DataType_Vec_double_4_fmt + + def __init__(self): + _SH._DataType_Vec_double_4_swiginit(self, _SH.new__DataType_Vec_double_4()) + __swig_destroy__ = _SH.delete__DataType_Vec_double_4 + +# Register _DataType_Vec_double_4 in _SH: +_SH._DataType_Vec_double_4_swigregister(_DataType_Vec_double_4) + + +Vec4d = _Vec_double_4 +DataType_Vec4d = _DataType_Vec_double_4 + +class _Matx_double_6_1(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_6_1_rows + cols = _SH._Matx_double_6_1_cols + channels = _SH._Matx_double_6_1_channels + shortdim = _SH._Matx_double_6_1_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_6_1_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_6_1_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_6_1_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_6_1_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_6_1_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_6_1_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_6_1_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_6_1_ddot(self, v) + + def t(self): + return _SH._Matx_double_6_1_t(self) + + def mul(self, a): + return _SH._Matx_double_6_1_mul(self, a) + + def div(self, a): + return _SH._Matx_double_6_1_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_6_1___call__(self, i, j) + val = property(_SH._Matx_double_6_1_val_get, _SH._Matx_double_6_1_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_6_1_swiginit(self, _SH.new__Matx_double_6_1(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_6_1___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_6_1 + +# Register _Matx_double_6_1 in _SH: +_SH._Matx_double_6_1_swigregister(_Matx_double_6_1) + +def _Matx_double_6_1_all(alpha): + return _SH._Matx_double_6_1_all(alpha) + +def _Matx_double_6_1_zeros(): + return _SH._Matx_double_6_1_zeros() + +def _Matx_double_6_1_ones(): + return _SH._Matx_double_6_1_ones() + +def _Matx_double_6_1_eye(): + return _SH._Matx_double_6_1_eye() + +def _Matx_double_6_1_randu(a, b): + return _SH._Matx_double_6_1_randu(a, b) + +def _Matx_double_6_1_randn(a, b): + return _SH._Matx_double_6_1_randn(a, b) + + +Matx61d = _Matx_double_6_1 + +class _Vec_double_6(_Matx_double_6_1): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + channels = _SH._Vec_double_6_channels + + @staticmethod + def all(alpha): + return _SH._Vec_double_6_all(alpha) + + def mul(self, v): + return _SH._Vec_double_6_mul(self, v) + + def __call__(self, i): + return _SH._Vec_double_6___call__(self, i) + + import re + _re_pattern = re.compile("^_Vec_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + + array = _array_map[value_type](rows) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Vec_double_6_swiginit(self, _SH.new__Vec_double_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + return {"shape": (rows, 1), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + + if not isinstance(key, int): + raise TypeError + + if key >= rows: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Vec_double_6___str__(self) + __swig_destroy__ = _SH.delete__Vec_double_6 + +# Register _Vec_double_6 in _SH: +_SH._Vec_double_6_swigregister(_Vec_double_6) + +def _Vec_double_6_all(alpha): + return _SH._Vec_double_6_all(alpha) + +class _DataType_Vec_double_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + generic_type = _SH._DataType_Vec_double_6_generic_type + channels = _SH._DataType_Vec_double_6_channels + fmt = _SH._DataType_Vec_double_6_fmt + + def __init__(self): + _SH._DataType_Vec_double_6_swiginit(self, _SH.new__DataType_Vec_double_6()) + __swig_destroy__ = _SH.delete__DataType_Vec_double_6 + +# Register _DataType_Vec_double_6 in _SH: +_SH._DataType_Vec_double_6_swigregister(_DataType_Vec_double_6) + + +Vec6d = _Vec_double_6 +DataType_Vec6d = _DataType_Vec_double_6 + +class _mat__np_array_constructor(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self): + _SH._mat__np_array_constructor_swiginit(self, _SH.new__mat__np_array_constructor()) + __swig_destroy__ = _SH.delete__mat__np_array_constructor + +# Register _mat__np_array_constructor in _SH: +_SH._mat__np_array_constructor_swigregister(_mat__np_array_constructor) + + +def _depthToDtype(depth): + return _SH._depthToDtype(depth) + +def _toCvType(dtype, nChannel): + return _SH._toCvType(dtype, nChannel) +class _cv_numpy_sizeof_uchar(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_uchar_value + + def __init__(self): + _SH._cv_numpy_sizeof_uchar_swiginit(self, _SH.new__cv_numpy_sizeof_uchar()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_uchar + +# Register _cv_numpy_sizeof_uchar in _SH: +_SH._cv_numpy_sizeof_uchar_swigregister(_cv_numpy_sizeof_uchar) + + +if _cv_numpy_sizeof_uchar.value == 1: + _cv_numpy_typestr_map["uchar"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["uchar"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_uchar.value) + +class _Mat__uchar(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__uchar_create(self, *args) + + def cross(self, m): + return _SH._Mat__uchar_cross(self, m) + + def row(self, y): + return _SH._Mat__uchar_row(self, y) + + def col(self, x): + return _SH._Mat__uchar_col(self, x) + + def diag(self, d=0): + return _SH._Mat__uchar_diag(self, d) + + def clone(self): + return _SH._Mat__uchar_clone(self) + + def elemSize(self): + return _SH._Mat__uchar_elemSize(self) + + def elemSize1(self): + return _SH._Mat__uchar_elemSize1(self) + + def type(self): + return _SH._Mat__uchar_type(self) + + def depth(self): + return _SH._Mat__uchar_depth(self) + + def channels(self): + return _SH._Mat__uchar_channels(self) + + def step1(self, i=0): + return _SH._Mat__uchar_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__uchar_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__uchar_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__uchar___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__uchar_swiginit(self, _SH.new__Mat__uchar(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__uchar___str__(self) + __swig_destroy__ = _SH.delete__Mat__uchar + +# Register _Mat__uchar in _SH: +_SH._Mat__uchar_swigregister(_Mat__uchar) + + +Mat1b = _Mat__uchar + +class _cv_numpy_sizeof_Vec2b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2b_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2b_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2b()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2b + +# Register _cv_numpy_sizeof_Vec2b in _SH: +_SH._cv_numpy_sizeof_Vec2b_swigregister(_cv_numpy_sizeof_Vec2b) + + +if _cv_numpy_sizeof_Vec2b.value == 1: + _cv_numpy_typestr_map["Vec2b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2b.value) + +class _Mat__Vec2b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2b_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2b_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2b_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2b_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2b_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2b_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2b_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2b_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2b_type(self) + + def depth(self): + return _SH._Mat__Vec2b_depth(self) + + def channels(self): + return _SH._Mat__Vec2b_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2b_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2b___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2b_swiginit(self, _SH.new__Mat__Vec2b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2b___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2b + +# Register _Mat__Vec2b in _SH: +_SH._Mat__Vec2b_swigregister(_Mat__Vec2b) + + +Mat2b = _Mat__Vec2b + +class _cv_numpy_sizeof_Vec3b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3b_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3b_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3b()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3b + +# Register _cv_numpy_sizeof_Vec3b in _SH: +_SH._cv_numpy_sizeof_Vec3b_swigregister(_cv_numpy_sizeof_Vec3b) + + +if _cv_numpy_sizeof_Vec3b.value == 1: + _cv_numpy_typestr_map["Vec3b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3b.value) + +class _Mat__Vec3b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3b_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3b_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3b_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3b_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3b_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3b_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3b_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3b_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3b_type(self) + + def depth(self): + return _SH._Mat__Vec3b_depth(self) + + def channels(self): + return _SH._Mat__Vec3b_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3b_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3b___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3b_swiginit(self, _SH.new__Mat__Vec3b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3b___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3b + +# Register _Mat__Vec3b in _SH: +_SH._Mat__Vec3b_swigregister(_Mat__Vec3b) + + +Mat3b = _Mat__Vec3b + +class _cv_numpy_sizeof_Vec4b(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4b_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4b_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4b()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4b + +# Register _cv_numpy_sizeof_Vec4b in _SH: +_SH._cv_numpy_sizeof_Vec4b_swigregister(_cv_numpy_sizeof_Vec4b) + + +if _cv_numpy_sizeof_Vec4b.value == 1: + _cv_numpy_typestr_map["Vec4b"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4b"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4b.value) + +class _Mat__Vec4b(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4b_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4b_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4b_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4b_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4b_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4b_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4b_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4b_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4b_type(self) + + def depth(self): + return _SH._Mat__Vec4b_depth(self) + + def channels(self): + return _SH._Mat__Vec4b_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4b_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4b_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4b_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4b___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4b_swiginit(self, _SH.new__Mat__Vec4b(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4b___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4b + +# Register _Mat__Vec4b in _SH: +_SH._Mat__Vec4b_swigregister(_Mat__Vec4b) + + +Mat4b = _Mat__Vec4b + +class _Mat__short(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__short_create(self, *args) + + def cross(self, m): + return _SH._Mat__short_cross(self, m) + + def row(self, y): + return _SH._Mat__short_row(self, y) + + def col(self, x): + return _SH._Mat__short_col(self, x) + + def diag(self, d=0): + return _SH._Mat__short_diag(self, d) + + def clone(self): + return _SH._Mat__short_clone(self) + + def elemSize(self): + return _SH._Mat__short_elemSize(self) + + def elemSize1(self): + return _SH._Mat__short_elemSize1(self) + + def type(self): + return _SH._Mat__short_type(self) + + def depth(self): + return _SH._Mat__short_depth(self) + + def channels(self): + return _SH._Mat__short_channels(self) + + def step1(self, i=0): + return _SH._Mat__short_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__short_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__short_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__short___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__short_swiginit(self, _SH.new__Mat__short(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__short___str__(self) + __swig_destroy__ = _SH.delete__Mat__short + +# Register _Mat__short in _SH: +_SH._Mat__short_swigregister(_Mat__short) + + +Mat1s = _Mat__short + +class _cv_numpy_sizeof_Vec2s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2s_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2s_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2s()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2s + +# Register _cv_numpy_sizeof_Vec2s in _SH: +_SH._cv_numpy_sizeof_Vec2s_swigregister(_cv_numpy_sizeof_Vec2s) + + +if _cv_numpy_sizeof_Vec2s.value == 1: + _cv_numpy_typestr_map["Vec2s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2s.value) + +class _Mat__Vec2s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2s_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2s_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2s_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2s_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2s_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2s_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2s_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2s_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2s_type(self) + + def depth(self): + return _SH._Mat__Vec2s_depth(self) + + def channels(self): + return _SH._Mat__Vec2s_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2s_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2s___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2s_swiginit(self, _SH.new__Mat__Vec2s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2s___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2s + +# Register _Mat__Vec2s in _SH: +_SH._Mat__Vec2s_swigregister(_Mat__Vec2s) + + +Mat2s = _Mat__Vec2s + +class _cv_numpy_sizeof_Vec3s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3s_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3s_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3s()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3s + +# Register _cv_numpy_sizeof_Vec3s in _SH: +_SH._cv_numpy_sizeof_Vec3s_swigregister(_cv_numpy_sizeof_Vec3s) + + +if _cv_numpy_sizeof_Vec3s.value == 1: + _cv_numpy_typestr_map["Vec3s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3s.value) + +class _Mat__Vec3s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3s_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3s_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3s_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3s_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3s_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3s_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3s_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3s_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3s_type(self) + + def depth(self): + return _SH._Mat__Vec3s_depth(self) + + def channels(self): + return _SH._Mat__Vec3s_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3s_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3s___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3s_swiginit(self, _SH.new__Mat__Vec3s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3s___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3s + +# Register _Mat__Vec3s in _SH: +_SH._Mat__Vec3s_swigregister(_Mat__Vec3s) + + +Mat3s = _Mat__Vec3s + +class _cv_numpy_sizeof_Vec4s(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4s_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4s_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4s()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4s + +# Register _cv_numpy_sizeof_Vec4s in _SH: +_SH._cv_numpy_sizeof_Vec4s_swigregister(_cv_numpy_sizeof_Vec4s) + + +if _cv_numpy_sizeof_Vec4s.value == 1: + _cv_numpy_typestr_map["Vec4s"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4s"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4s.value) + +class _Mat__Vec4s(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4s_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4s_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4s_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4s_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4s_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4s_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4s_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4s_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4s_type(self) + + def depth(self): + return _SH._Mat__Vec4s_depth(self) + + def channels(self): + return _SH._Mat__Vec4s_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4s_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4s_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4s_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4s___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4s_swiginit(self, _SH.new__Mat__Vec4s(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4s___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4s + +# Register _Mat__Vec4s in _SH: +_SH._Mat__Vec4s_swigregister(_Mat__Vec4s) + + +Mat4s = _Mat__Vec4s + +class _Mat__ushort(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__ushort_create(self, *args) + + def cross(self, m): + return _SH._Mat__ushort_cross(self, m) + + def row(self, y): + return _SH._Mat__ushort_row(self, y) + + def col(self, x): + return _SH._Mat__ushort_col(self, x) + + def diag(self, d=0): + return _SH._Mat__ushort_diag(self, d) + + def clone(self): + return _SH._Mat__ushort_clone(self) + + def elemSize(self): + return _SH._Mat__ushort_elemSize(self) + + def elemSize1(self): + return _SH._Mat__ushort_elemSize1(self) + + def type(self): + return _SH._Mat__ushort_type(self) + + def depth(self): + return _SH._Mat__ushort_depth(self) + + def channels(self): + return _SH._Mat__ushort_channels(self) + + def step1(self, i=0): + return _SH._Mat__ushort_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__ushort_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__ushort_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__ushort___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__ushort_swiginit(self, _SH.new__Mat__ushort(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__ushort___str__(self) + __swig_destroy__ = _SH.delete__Mat__ushort + +# Register _Mat__ushort in _SH: +_SH._Mat__ushort_swigregister(_Mat__ushort) + + +Mat1w = _Mat__ushort + +class _cv_numpy_sizeof_Vec2w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2w_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2w_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2w()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2w + +# Register _cv_numpy_sizeof_Vec2w in _SH: +_SH._cv_numpy_sizeof_Vec2w_swigregister(_cv_numpy_sizeof_Vec2w) + + +if _cv_numpy_sizeof_Vec2w.value == 1: + _cv_numpy_typestr_map["Vec2w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec2w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec2w.value) + +class _Mat__Vec2w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2w_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2w_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2w_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2w_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2w_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2w_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2w_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2w_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2w_type(self) + + def depth(self): + return _SH._Mat__Vec2w_depth(self) + + def channels(self): + return _SH._Mat__Vec2w_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2w_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2w___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2w_swiginit(self, _SH.new__Mat__Vec2w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2w___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2w + +# Register _Mat__Vec2w in _SH: +_SH._Mat__Vec2w_swigregister(_Mat__Vec2w) + + +Mat2w = _Mat__Vec2w + +class _cv_numpy_sizeof_Vec3w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3w_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3w_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3w()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3w + +# Register _cv_numpy_sizeof_Vec3w in _SH: +_SH._cv_numpy_sizeof_Vec3w_swigregister(_cv_numpy_sizeof_Vec3w) + + +if _cv_numpy_sizeof_Vec3w.value == 1: + _cv_numpy_typestr_map["Vec3w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec3w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec3w.value) + +class _Mat__Vec3w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3w_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3w_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3w_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3w_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3w_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3w_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3w_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3w_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3w_type(self) + + def depth(self): + return _SH._Mat__Vec3w_depth(self) + + def channels(self): + return _SH._Mat__Vec3w_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3w_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3w___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3w_swiginit(self, _SH.new__Mat__Vec3w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3w___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3w + +# Register _Mat__Vec3w in _SH: +_SH._Mat__Vec3w_swigregister(_Mat__Vec3w) + + +Mat3w = _Mat__Vec3w + +class _cv_numpy_sizeof_Vec4w(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4w_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4w_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4w()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4w + +# Register _cv_numpy_sizeof_Vec4w in _SH: +_SH._cv_numpy_sizeof_Vec4w_swigregister(_cv_numpy_sizeof_Vec4w) + + +if _cv_numpy_sizeof_Vec4w.value == 1: + _cv_numpy_typestr_map["Vec4w"] = "|" +"u" + "1" +else: + _cv_numpy_typestr_map["Vec4w"] = _cv_numpy_endianess +"u" + str(_cv_numpy_sizeof_Vec4w.value) + +class _Mat__Vec4w(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4w_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4w_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4w_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4w_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4w_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4w_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4w_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4w_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4w_type(self) + + def depth(self): + return _SH._Mat__Vec4w_depth(self) + + def channels(self): + return _SH._Mat__Vec4w_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4w_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4w_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4w_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4w___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4w_swiginit(self, _SH.new__Mat__Vec4w(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4w___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4w + +# Register _Mat__Vec4w in _SH: +_SH._Mat__Vec4w_swigregister(_Mat__Vec4w) + + +Mat4w = _Mat__Vec4w + +class _Mat__int(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__int_create(self, *args) + + def cross(self, m): + return _SH._Mat__int_cross(self, m) + + def row(self, y): + return _SH._Mat__int_row(self, y) + + def col(self, x): + return _SH._Mat__int_col(self, x) + + def diag(self, d=0): + return _SH._Mat__int_diag(self, d) + + def clone(self): + return _SH._Mat__int_clone(self) + + def elemSize(self): + return _SH._Mat__int_elemSize(self) + + def elemSize1(self): + return _SH._Mat__int_elemSize1(self) + + def type(self): + return _SH._Mat__int_type(self) + + def depth(self): + return _SH._Mat__int_depth(self) + + def channels(self): + return _SH._Mat__int_channels(self) + + def step1(self, i=0): + return _SH._Mat__int_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__int_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__int_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__int___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__int_swiginit(self, _SH.new__Mat__int(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__int___str__(self) + __swig_destroy__ = _SH.delete__Mat__int + +# Register _Mat__int in _SH: +_SH._Mat__int_swigregister(_Mat__int) + + +Mat1i = _Mat__int + +class _cv_numpy_sizeof_Vec2i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2i_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2i_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2i()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2i + +# Register _cv_numpy_sizeof_Vec2i in _SH: +_SH._cv_numpy_sizeof_Vec2i_swigregister(_cv_numpy_sizeof_Vec2i) + + +if _cv_numpy_sizeof_Vec2i.value == 1: + _cv_numpy_typestr_map["Vec2i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec2i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec2i.value) + +class _Mat__Vec2i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2i_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2i_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2i_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2i_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2i_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2i_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2i_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2i_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2i_type(self) + + def depth(self): + return _SH._Mat__Vec2i_depth(self) + + def channels(self): + return _SH._Mat__Vec2i_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2i_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2i___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2i_swiginit(self, _SH.new__Mat__Vec2i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2i___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2i + +# Register _Mat__Vec2i in _SH: +_SH._Mat__Vec2i_swigregister(_Mat__Vec2i) + + +Mat2i = _Mat__Vec2i + +class _cv_numpy_sizeof_Vec3i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3i_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3i_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3i()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3i + +# Register _cv_numpy_sizeof_Vec3i in _SH: +_SH._cv_numpy_sizeof_Vec3i_swigregister(_cv_numpy_sizeof_Vec3i) + + +if _cv_numpy_sizeof_Vec3i.value == 1: + _cv_numpy_typestr_map["Vec3i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec3i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec3i.value) + +class _Mat__Vec3i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3i_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3i_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3i_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3i_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3i_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3i_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3i_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3i_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3i_type(self) + + def depth(self): + return _SH._Mat__Vec3i_depth(self) + + def channels(self): + return _SH._Mat__Vec3i_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3i_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3i___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3i_swiginit(self, _SH.new__Mat__Vec3i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3i___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3i + +# Register _Mat__Vec3i in _SH: +_SH._Mat__Vec3i_swigregister(_Mat__Vec3i) + + +Mat3i = _Mat__Vec3i + +class _cv_numpy_sizeof_Vec4i(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4i_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4i_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4i()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4i + +# Register _cv_numpy_sizeof_Vec4i in _SH: +_SH._cv_numpy_sizeof_Vec4i_swigregister(_cv_numpy_sizeof_Vec4i) + + +if _cv_numpy_sizeof_Vec4i.value == 1: + _cv_numpy_typestr_map["Vec4i"] = "|" +"i" + "1" +else: + _cv_numpy_typestr_map["Vec4i"] = _cv_numpy_endianess +"i" + str(_cv_numpy_sizeof_Vec4i.value) + +class _Mat__Vec4i(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4i_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4i_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4i_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4i_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4i_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4i_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4i_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4i_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4i_type(self) + + def depth(self): + return _SH._Mat__Vec4i_depth(self) + + def channels(self): + return _SH._Mat__Vec4i_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4i_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4i_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4i_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4i___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4i_swiginit(self, _SH.new__Mat__Vec4i(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4i___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4i + +# Register _Mat__Vec4i in _SH: +_SH._Mat__Vec4i_swigregister(_Mat__Vec4i) + + +Mat4i = _Mat__Vec4i + +class _Mat__float(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__float_create(self, *args) + + def cross(self, m): + return _SH._Mat__float_cross(self, m) + + def row(self, y): + return _SH._Mat__float_row(self, y) + + def col(self, x): + return _SH._Mat__float_col(self, x) + + def diag(self, d=0): + return _SH._Mat__float_diag(self, d) + + def clone(self): + return _SH._Mat__float_clone(self) + + def elemSize(self): + return _SH._Mat__float_elemSize(self) + + def elemSize1(self): + return _SH._Mat__float_elemSize1(self) + + def type(self): + return _SH._Mat__float_type(self) + + def depth(self): + return _SH._Mat__float_depth(self) + + def channels(self): + return _SH._Mat__float_channels(self) + + def step1(self, i=0): + return _SH._Mat__float_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__float_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__float_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__float___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__float_swiginit(self, _SH.new__Mat__float(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__float___str__(self) + __swig_destroy__ = _SH.delete__Mat__float + +# Register _Mat__float in _SH: +_SH._Mat__float_swigregister(_Mat__float) + + +Mat1f = _Mat__float + +class _cv_numpy_sizeof_Vec2f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2f_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2f_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2f()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2f + +# Register _cv_numpy_sizeof_Vec2f in _SH: +_SH._cv_numpy_sizeof_Vec2f_swigregister(_cv_numpy_sizeof_Vec2f) + + +if _cv_numpy_sizeof_Vec2f.value == 1: + _cv_numpy_typestr_map["Vec2f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2f.value) + +class _Mat__Vec2f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2f_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2f_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2f_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2f_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2f_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2f_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2f_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2f_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2f_type(self) + + def depth(self): + return _SH._Mat__Vec2f_depth(self) + + def channels(self): + return _SH._Mat__Vec2f_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2f_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2f___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2f_swiginit(self, _SH.new__Mat__Vec2f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2f___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2f + +# Register _Mat__Vec2f in _SH: +_SH._Mat__Vec2f_swigregister(_Mat__Vec2f) + + +Mat2f = _Mat__Vec2f + +class _cv_numpy_sizeof_Vec3f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3f_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3f_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3f()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3f + +# Register _cv_numpy_sizeof_Vec3f in _SH: +_SH._cv_numpy_sizeof_Vec3f_swigregister(_cv_numpy_sizeof_Vec3f) + + +if _cv_numpy_sizeof_Vec3f.value == 1: + _cv_numpy_typestr_map["Vec3f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3f.value) + +class _Mat__Vec3f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3f_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3f_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3f_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3f_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3f_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3f_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3f_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3f_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3f_type(self) + + def depth(self): + return _SH._Mat__Vec3f_depth(self) + + def channels(self): + return _SH._Mat__Vec3f_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3f_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3f___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3f_swiginit(self, _SH.new__Mat__Vec3f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3f___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3f + +# Register _Mat__Vec3f in _SH: +_SH._Mat__Vec3f_swigregister(_Mat__Vec3f) + + +Mat3f = _Mat__Vec3f + +class _cv_numpy_sizeof_Vec4f(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4f_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4f_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4f()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4f + +# Register _cv_numpy_sizeof_Vec4f in _SH: +_SH._cv_numpy_sizeof_Vec4f_swigregister(_cv_numpy_sizeof_Vec4f) + + +if _cv_numpy_sizeof_Vec4f.value == 1: + _cv_numpy_typestr_map["Vec4f"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4f"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4f.value) + +class _Mat__Vec4f(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4f_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4f_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4f_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4f_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4f_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4f_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4f_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4f_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4f_type(self) + + def depth(self): + return _SH._Mat__Vec4f_depth(self) + + def channels(self): + return _SH._Mat__Vec4f_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4f_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4f_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4f_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4f___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4f_swiginit(self, _SH.new__Mat__Vec4f(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4f___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4f + +# Register _Mat__Vec4f in _SH: +_SH._Mat__Vec4f_swigregister(_Mat__Vec4f) + + +Mat4f = _Mat__Vec4f + +class _Mat__double(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__double_create(self, *args) + + def cross(self, m): + return _SH._Mat__double_cross(self, m) + + def row(self, y): + return _SH._Mat__double_row(self, y) + + def col(self, x): + return _SH._Mat__double_col(self, x) + + def diag(self, d=0): + return _SH._Mat__double_diag(self, d) + + def clone(self): + return _SH._Mat__double_clone(self) + + def elemSize(self): + return _SH._Mat__double_elemSize(self) + + def elemSize1(self): + return _SH._Mat__double_elemSize1(self) + + def type(self): + return _SH._Mat__double_type(self) + + def depth(self): + return _SH._Mat__double_depth(self) + + def channels(self): + return _SH._Mat__double_channels(self) + + def step1(self, i=0): + return _SH._Mat__double_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__double_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__double_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__double___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__double_swiginit(self, _SH.new__Mat__double(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__double___str__(self) + __swig_destroy__ = _SH.delete__Mat__double + +# Register _Mat__double in _SH: +_SH._Mat__double_swigregister(_Mat__double) + + +Mat1d = _Mat__double + +class _cv_numpy_sizeof_Vec2d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec2d_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec2d_swiginit(self, _SH.new__cv_numpy_sizeof_Vec2d()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec2d + +# Register _cv_numpy_sizeof_Vec2d in _SH: +_SH._cv_numpy_sizeof_Vec2d_swigregister(_cv_numpy_sizeof_Vec2d) + + +if _cv_numpy_sizeof_Vec2d.value == 1: + _cv_numpy_typestr_map["Vec2d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec2d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec2d.value) + +class _Mat__Vec2d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec2d_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec2d_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec2d_row(self, y) + + def col(self, x): + return _SH._Mat__Vec2d_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec2d_diag(self, d) + + def clone(self): + return _SH._Mat__Vec2d_clone(self) + + def elemSize(self): + return _SH._Mat__Vec2d_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec2d_elemSize1(self) + + def type(self): + return _SH._Mat__Vec2d_type(self) + + def depth(self): + return _SH._Mat__Vec2d_depth(self) + + def channels(self): + return _SH._Mat__Vec2d_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec2d_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec2d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec2d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec2d___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec2d_swiginit(self, _SH.new__Mat__Vec2d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec2d___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec2d + +# Register _Mat__Vec2d in _SH: +_SH._Mat__Vec2d_swigregister(_Mat__Vec2d) + + +Mat2d = _Mat__Vec2d + +class _cv_numpy_sizeof_Vec3d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec3d_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec3d_swiginit(self, _SH.new__cv_numpy_sizeof_Vec3d()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec3d + +# Register _cv_numpy_sizeof_Vec3d in _SH: +_SH._cv_numpy_sizeof_Vec3d_swigregister(_cv_numpy_sizeof_Vec3d) + + +if _cv_numpy_sizeof_Vec3d.value == 1: + _cv_numpy_typestr_map["Vec3d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec3d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec3d.value) + +class _Mat__Vec3d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec3d_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec3d_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec3d_row(self, y) + + def col(self, x): + return _SH._Mat__Vec3d_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec3d_diag(self, d) + + def clone(self): + return _SH._Mat__Vec3d_clone(self) + + def elemSize(self): + return _SH._Mat__Vec3d_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec3d_elemSize1(self) + + def type(self): + return _SH._Mat__Vec3d_type(self) + + def depth(self): + return _SH._Mat__Vec3d_depth(self) + + def channels(self): + return _SH._Mat__Vec3d_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec3d_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec3d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec3d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec3d___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec3d_swiginit(self, _SH.new__Mat__Vec3d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec3d___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec3d + +# Register _Mat__Vec3d in _SH: +_SH._Mat__Vec3d_swigregister(_Mat__Vec3d) + + +Mat3d = _Mat__Vec3d + +class _cv_numpy_sizeof_Vec4d(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + value = _SH._cv_numpy_sizeof_Vec4d_value + + def __init__(self): + _SH._cv_numpy_sizeof_Vec4d_swiginit(self, _SH.new__cv_numpy_sizeof_Vec4d()) + __swig_destroy__ = _SH.delete__cv_numpy_sizeof_Vec4d + +# Register _cv_numpy_sizeof_Vec4d in _SH: +_SH._cv_numpy_sizeof_Vec4d_swigregister(_cv_numpy_sizeof_Vec4d) + + +if _cv_numpy_sizeof_Vec4d.value == 1: + _cv_numpy_typestr_map["Vec4d"] = "|" +"f" + "1" +else: + _cv_numpy_typestr_map["Vec4d"] = _cv_numpy_endianess +"f" + str(_cv_numpy_sizeof_Vec4d.value) + +class _Mat__Vec4d(Mat): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def create(self, *args): + return _SH._Mat__Vec4d_create(self, *args) + + def cross(self, m): + return _SH._Mat__Vec4d_cross(self, m) + + def row(self, y): + return _SH._Mat__Vec4d_row(self, y) + + def col(self, x): + return _SH._Mat__Vec4d_col(self, x) + + def diag(self, d=0): + return _SH._Mat__Vec4d_diag(self, d) + + def clone(self): + return _SH._Mat__Vec4d_clone(self) + + def elemSize(self): + return _SH._Mat__Vec4d_elemSize(self) + + def elemSize1(self): + return _SH._Mat__Vec4d_elemSize1(self) + + def type(self): + return _SH._Mat__Vec4d_type(self) + + def depth(self): + return _SH._Mat__Vec4d_depth(self) + + def channels(self): + return _SH._Mat__Vec4d_channels(self) + + def step1(self, i=0): + return _SH._Mat__Vec4d_step1(self, i) + + def stepT(self, i=0): + return _SH._Mat__Vec4d_stepT(self, i) + + def adjustROI(self, dtop, dbottom, dleft, dright): + return _SH._Mat__Vec4d_adjustROI(self, dtop, dbottom, dleft, dright) + + def __call__(self, *args): + return _SH._Mat__Vec4d___call__(self, *args) + + def __init__(self, *args): + _SH._Mat__Vec4d_swiginit(self, _SH.new__Mat__Vec4d(*args)) + + @classmethod + def __check_channels_compatibility(cls, array): + obj = cls() + n_channel = obj.channels() + + if n_channel == 1: + if len(array.shape) != 2: + raise ValueError("{} expects a 2-dimensional numpy ndarray.".format(cls)) + else: + if len(array.shape) != 3: + raise ValueError("{} expects a 3-dimensional numpy ndarray.".format(cls)) + elif array.shape[2] != n_channel: + raise ValueError("{} expects the last ndarray dimension to have a size of {}".format(cls, n_channel)) + + @classmethod + def from_array(cls, array): + import numpy as np + array = np.asarray(array) + + if cls()._typestr() != array.__array_interface__['typestr']: + raise ValueError("{} expects a {} datatype.".format(cls, cls()._typestr())) + + cls.__check_channels_compatibility(array) + + new_mat = cls(_mat__np_array_constructor(), + array.shape[0], + array.shape[1], + array.__array_interface__['data'][0]) + + # Holds an internal reference to keep the image buffer alive + new_mat._array = array + + return new_mat + + + def __str__(self): + return _SH._Mat__Vec4d___str__(self) + __swig_destroy__ = _SH.delete__Mat__Vec4d + +# Register _Mat__Vec4d in _SH: +_SH._Mat__Vec4d_swigregister(_Mat__Vec4d) + + +Mat4d = _Mat__Vec4d + +class _Matx_float_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_1_2_rows + cols = _SH._Matx_float_1_2_cols + channels = _SH._Matx_float_1_2_channels + shortdim = _SH._Matx_float_1_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_1_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_1_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_1_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_1_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_1_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_1_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_1_2_ddot(self, v) + + def t(self): + return _SH._Matx_float_1_2_t(self) + + def mul(self, a): + return _SH._Matx_float_1_2_mul(self, a) + + def div(self, a): + return _SH._Matx_float_1_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_1_2___call__(self, i, j) + val = property(_SH._Matx_float_1_2_val_get, _SH._Matx_float_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_1_2_swiginit(self, _SH.new__Matx_float_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_1_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_1_2 + +# Register _Matx_float_1_2 in _SH: +_SH._Matx_float_1_2_swigregister(_Matx_float_1_2) + +def _Matx_float_1_2_all(alpha): + return _SH._Matx_float_1_2_all(alpha) + +def _Matx_float_1_2_zeros(): + return _SH._Matx_float_1_2_zeros() + +def _Matx_float_1_2_ones(): + return _SH._Matx_float_1_2_ones() + +def _Matx_float_1_2_eye(): + return _SH._Matx_float_1_2_eye() + +def _Matx_float_1_2_randu(a, b): + return _SH._Matx_float_1_2_randu(a, b) + +def _Matx_float_1_2_randn(a, b): + return _SH._Matx_float_1_2_randn(a, b) + + +Matx12f = _Matx_float_1_2 + +class _Matx_double_1_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_1_2_rows + cols = _SH._Matx_double_1_2_cols + channels = _SH._Matx_double_1_2_channels + shortdim = _SH._Matx_double_1_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_1_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_1_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_1_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_1_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_1_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_1_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_1_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_1_2_ddot(self, v) + + def t(self): + return _SH._Matx_double_1_2_t(self) + + def mul(self, a): + return _SH._Matx_double_1_2_mul(self, a) + + def div(self, a): + return _SH._Matx_double_1_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_1_2___call__(self, i, j) + val = property(_SH._Matx_double_1_2_val_get, _SH._Matx_double_1_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_1_2_swiginit(self, _SH.new__Matx_double_1_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_1_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_1_2 + +# Register _Matx_double_1_2 in _SH: +_SH._Matx_double_1_2_swigregister(_Matx_double_1_2) + +def _Matx_double_1_2_all(alpha): + return _SH._Matx_double_1_2_all(alpha) + +def _Matx_double_1_2_zeros(): + return _SH._Matx_double_1_2_zeros() + +def _Matx_double_1_2_ones(): + return _SH._Matx_double_1_2_ones() + +def _Matx_double_1_2_eye(): + return _SH._Matx_double_1_2_eye() + +def _Matx_double_1_2_randu(a, b): + return _SH._Matx_double_1_2_randu(a, b) + +def _Matx_double_1_2_randn(a, b): + return _SH._Matx_double_1_2_randn(a, b) + + +Matx12d = _Matx_double_1_2 + +class _Matx_float_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_1_3_rows + cols = _SH._Matx_float_1_3_cols + channels = _SH._Matx_float_1_3_channels + shortdim = _SH._Matx_float_1_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_1_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_1_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_1_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_1_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_1_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_1_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_1_3_ddot(self, v) + + def t(self): + return _SH._Matx_float_1_3_t(self) + + def mul(self, a): + return _SH._Matx_float_1_3_mul(self, a) + + def div(self, a): + return _SH._Matx_float_1_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_1_3___call__(self, i, j) + val = property(_SH._Matx_float_1_3_val_get, _SH._Matx_float_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_1_3_swiginit(self, _SH.new__Matx_float_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_1_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_1_3 + +# Register _Matx_float_1_3 in _SH: +_SH._Matx_float_1_3_swigregister(_Matx_float_1_3) + +def _Matx_float_1_3_all(alpha): + return _SH._Matx_float_1_3_all(alpha) + +def _Matx_float_1_3_zeros(): + return _SH._Matx_float_1_3_zeros() + +def _Matx_float_1_3_ones(): + return _SH._Matx_float_1_3_ones() + +def _Matx_float_1_3_eye(): + return _SH._Matx_float_1_3_eye() + +def _Matx_float_1_3_randu(a, b): + return _SH._Matx_float_1_3_randu(a, b) + +def _Matx_float_1_3_randn(a, b): + return _SH._Matx_float_1_3_randn(a, b) + + +Matx13f = _Matx_float_1_3 + +class _Matx_double_1_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_1_3_rows + cols = _SH._Matx_double_1_3_cols + channels = _SH._Matx_double_1_3_channels + shortdim = _SH._Matx_double_1_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_1_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_1_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_1_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_1_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_1_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_1_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_1_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_1_3_ddot(self, v) + + def t(self): + return _SH._Matx_double_1_3_t(self) + + def mul(self, a): + return _SH._Matx_double_1_3_mul(self, a) + + def div(self, a): + return _SH._Matx_double_1_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_1_3___call__(self, i, j) + val = property(_SH._Matx_double_1_3_val_get, _SH._Matx_double_1_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_1_3_swiginit(self, _SH.new__Matx_double_1_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_1_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_1_3 + +# Register _Matx_double_1_3 in _SH: +_SH._Matx_double_1_3_swigregister(_Matx_double_1_3) + +def _Matx_double_1_3_all(alpha): + return _SH._Matx_double_1_3_all(alpha) + +def _Matx_double_1_3_zeros(): + return _SH._Matx_double_1_3_zeros() + +def _Matx_double_1_3_ones(): + return _SH._Matx_double_1_3_ones() + +def _Matx_double_1_3_eye(): + return _SH._Matx_double_1_3_eye() + +def _Matx_double_1_3_randu(a, b): + return _SH._Matx_double_1_3_randu(a, b) + +def _Matx_double_1_3_randn(a, b): + return _SH._Matx_double_1_3_randn(a, b) + + +Matx13d = _Matx_double_1_3 + +class _Matx_float_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_1_4_rows + cols = _SH._Matx_float_1_4_cols + channels = _SH._Matx_float_1_4_channels + shortdim = _SH._Matx_float_1_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_1_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_1_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_1_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_1_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_1_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_1_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_1_4_ddot(self, v) + + def t(self): + return _SH._Matx_float_1_4_t(self) + + def mul(self, a): + return _SH._Matx_float_1_4_mul(self, a) + + def div(self, a): + return _SH._Matx_float_1_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_1_4___call__(self, i, j) + val = property(_SH._Matx_float_1_4_val_get, _SH._Matx_float_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_1_4_swiginit(self, _SH.new__Matx_float_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_1_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_1_4 + +# Register _Matx_float_1_4 in _SH: +_SH._Matx_float_1_4_swigregister(_Matx_float_1_4) + +def _Matx_float_1_4_all(alpha): + return _SH._Matx_float_1_4_all(alpha) + +def _Matx_float_1_4_zeros(): + return _SH._Matx_float_1_4_zeros() + +def _Matx_float_1_4_ones(): + return _SH._Matx_float_1_4_ones() + +def _Matx_float_1_4_eye(): + return _SH._Matx_float_1_4_eye() + +def _Matx_float_1_4_randu(a, b): + return _SH._Matx_float_1_4_randu(a, b) + +def _Matx_float_1_4_randn(a, b): + return _SH._Matx_float_1_4_randn(a, b) + + +Matx14f = _Matx_float_1_4 + +class _Matx_double_1_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_1_4_rows + cols = _SH._Matx_double_1_4_cols + channels = _SH._Matx_double_1_4_channels + shortdim = _SH._Matx_double_1_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_1_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_1_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_1_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_1_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_1_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_1_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_1_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_1_4_ddot(self, v) + + def t(self): + return _SH._Matx_double_1_4_t(self) + + def mul(self, a): + return _SH._Matx_double_1_4_mul(self, a) + + def div(self, a): + return _SH._Matx_double_1_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_1_4___call__(self, i, j) + val = property(_SH._Matx_double_1_4_val_get, _SH._Matx_double_1_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_1_4_swiginit(self, _SH.new__Matx_double_1_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_1_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_1_4 + +# Register _Matx_double_1_4 in _SH: +_SH._Matx_double_1_4_swigregister(_Matx_double_1_4) + +def _Matx_double_1_4_all(alpha): + return _SH._Matx_double_1_4_all(alpha) + +def _Matx_double_1_4_zeros(): + return _SH._Matx_double_1_4_zeros() + +def _Matx_double_1_4_ones(): + return _SH._Matx_double_1_4_ones() + +def _Matx_double_1_4_eye(): + return _SH._Matx_double_1_4_eye() + +def _Matx_double_1_4_randu(a, b): + return _SH._Matx_double_1_4_randu(a, b) + +def _Matx_double_1_4_randn(a, b): + return _SH._Matx_double_1_4_randn(a, b) + + +Matx14d = _Matx_double_1_4 + +class _Matx_float_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_1_6_rows + cols = _SH._Matx_float_1_6_cols + channels = _SH._Matx_float_1_6_channels + shortdim = _SH._Matx_float_1_6_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_1_6_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_1_6_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_1_6_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_1_6_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_1_6_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_1_6_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_1_6_ddot(self, v) + + def t(self): + return _SH._Matx_float_1_6_t(self) + + def mul(self, a): + return _SH._Matx_float_1_6_mul(self, a) + + def div(self, a): + return _SH._Matx_float_1_6_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_1_6___call__(self, i, j) + val = property(_SH._Matx_float_1_6_val_get, _SH._Matx_float_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_1_6_swiginit(self, _SH.new__Matx_float_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_1_6___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_1_6 + +# Register _Matx_float_1_6 in _SH: +_SH._Matx_float_1_6_swigregister(_Matx_float_1_6) + +def _Matx_float_1_6_all(alpha): + return _SH._Matx_float_1_6_all(alpha) + +def _Matx_float_1_6_zeros(): + return _SH._Matx_float_1_6_zeros() + +def _Matx_float_1_6_ones(): + return _SH._Matx_float_1_6_ones() + +def _Matx_float_1_6_eye(): + return _SH._Matx_float_1_6_eye() + +def _Matx_float_1_6_randu(a, b): + return _SH._Matx_float_1_6_randu(a, b) + +def _Matx_float_1_6_randn(a, b): + return _SH._Matx_float_1_6_randn(a, b) + + +Matx16f = _Matx_float_1_6 + +class _Matx_double_1_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_1_6_rows + cols = _SH._Matx_double_1_6_cols + channels = _SH._Matx_double_1_6_channels + shortdim = _SH._Matx_double_1_6_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_1_6_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_1_6_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_1_6_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_1_6_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_1_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_1_6_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_1_6_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_1_6_ddot(self, v) + + def t(self): + return _SH._Matx_double_1_6_t(self) + + def mul(self, a): + return _SH._Matx_double_1_6_mul(self, a) + + def div(self, a): + return _SH._Matx_double_1_6_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_1_6___call__(self, i, j) + val = property(_SH._Matx_double_1_6_val_get, _SH._Matx_double_1_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_1_6_swiginit(self, _SH.new__Matx_double_1_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_1_6___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_1_6 + +# Register _Matx_double_1_6 in _SH: +_SH._Matx_double_1_6_swigregister(_Matx_double_1_6) + +def _Matx_double_1_6_all(alpha): + return _SH._Matx_double_1_6_all(alpha) + +def _Matx_double_1_6_zeros(): + return _SH._Matx_double_1_6_zeros() + +def _Matx_double_1_6_ones(): + return _SH._Matx_double_1_6_ones() + +def _Matx_double_1_6_eye(): + return _SH._Matx_double_1_6_eye() + +def _Matx_double_1_6_randu(a, b): + return _SH._Matx_double_1_6_randu(a, b) + +def _Matx_double_1_6_randn(a, b): + return _SH._Matx_double_1_6_randn(a, b) + + +Matx16d = _Matx_double_1_6 + +class _Matx_float_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_2_2_rows + cols = _SH._Matx_float_2_2_cols + channels = _SH._Matx_float_2_2_channels + shortdim = _SH._Matx_float_2_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_2_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_2_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_2_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_2_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_2_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_2_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_2_2_ddot(self, v) + + def t(self): + return _SH._Matx_float_2_2_t(self) + + def mul(self, a): + return _SH._Matx_float_2_2_mul(self, a) + + def div(self, a): + return _SH._Matx_float_2_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_2_2___call__(self, i, j) + val = property(_SH._Matx_float_2_2_val_get, _SH._Matx_float_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_2_2_swiginit(self, _SH.new__Matx_float_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_2_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_2_2 + +# Register _Matx_float_2_2 in _SH: +_SH._Matx_float_2_2_swigregister(_Matx_float_2_2) + +def _Matx_float_2_2_all(alpha): + return _SH._Matx_float_2_2_all(alpha) + +def _Matx_float_2_2_zeros(): + return _SH._Matx_float_2_2_zeros() + +def _Matx_float_2_2_ones(): + return _SH._Matx_float_2_2_ones() + +def _Matx_float_2_2_eye(): + return _SH._Matx_float_2_2_eye() + +def _Matx_float_2_2_randu(a, b): + return _SH._Matx_float_2_2_randu(a, b) + +def _Matx_float_2_2_randn(a, b): + return _SH._Matx_float_2_2_randn(a, b) + + +Matx22f = _Matx_float_2_2 + +class _Matx_double_2_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_2_2_rows + cols = _SH._Matx_double_2_2_cols + channels = _SH._Matx_double_2_2_channels + shortdim = _SH._Matx_double_2_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_2_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_2_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_2_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_2_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_2_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_2_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_2_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_2_2_ddot(self, v) + + def t(self): + return _SH._Matx_double_2_2_t(self) + + def mul(self, a): + return _SH._Matx_double_2_2_mul(self, a) + + def div(self, a): + return _SH._Matx_double_2_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_2_2___call__(self, i, j) + val = property(_SH._Matx_double_2_2_val_get, _SH._Matx_double_2_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_2_2_swiginit(self, _SH.new__Matx_double_2_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_2_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_2_2 + +# Register _Matx_double_2_2 in _SH: +_SH._Matx_double_2_2_swigregister(_Matx_double_2_2) + +def _Matx_double_2_2_all(alpha): + return _SH._Matx_double_2_2_all(alpha) + +def _Matx_double_2_2_zeros(): + return _SH._Matx_double_2_2_zeros() + +def _Matx_double_2_2_ones(): + return _SH._Matx_double_2_2_ones() + +def _Matx_double_2_2_eye(): + return _SH._Matx_double_2_2_eye() + +def _Matx_double_2_2_randu(a, b): + return _SH._Matx_double_2_2_randu(a, b) + +def _Matx_double_2_2_randn(a, b): + return _SH._Matx_double_2_2_randn(a, b) + + +Matx22d = _Matx_double_2_2 + +class _Matx_float_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_2_3_rows + cols = _SH._Matx_float_2_3_cols + channels = _SH._Matx_float_2_3_channels + shortdim = _SH._Matx_float_2_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_2_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_2_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_2_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_2_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_2_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_2_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_2_3_ddot(self, v) + + def t(self): + return _SH._Matx_float_2_3_t(self) + + def mul(self, a): + return _SH._Matx_float_2_3_mul(self, a) + + def div(self, a): + return _SH._Matx_float_2_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_2_3___call__(self, i, j) + val = property(_SH._Matx_float_2_3_val_get, _SH._Matx_float_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_2_3_swiginit(self, _SH.new__Matx_float_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_2_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_2_3 + +# Register _Matx_float_2_3 in _SH: +_SH._Matx_float_2_3_swigregister(_Matx_float_2_3) + +def _Matx_float_2_3_all(alpha): + return _SH._Matx_float_2_3_all(alpha) + +def _Matx_float_2_3_zeros(): + return _SH._Matx_float_2_3_zeros() + +def _Matx_float_2_3_ones(): + return _SH._Matx_float_2_3_ones() + +def _Matx_float_2_3_eye(): + return _SH._Matx_float_2_3_eye() + +def _Matx_float_2_3_randu(a, b): + return _SH._Matx_float_2_3_randu(a, b) + +def _Matx_float_2_3_randn(a, b): + return _SH._Matx_float_2_3_randn(a, b) + + +Matx23f = _Matx_float_2_3 + +class _Matx_double_2_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_2_3_rows + cols = _SH._Matx_double_2_3_cols + channels = _SH._Matx_double_2_3_channels + shortdim = _SH._Matx_double_2_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_2_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_2_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_2_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_2_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_2_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_2_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_2_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_2_3_ddot(self, v) + + def t(self): + return _SH._Matx_double_2_3_t(self) + + def mul(self, a): + return _SH._Matx_double_2_3_mul(self, a) + + def div(self, a): + return _SH._Matx_double_2_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_2_3___call__(self, i, j) + val = property(_SH._Matx_double_2_3_val_get, _SH._Matx_double_2_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_2_3_swiginit(self, _SH.new__Matx_double_2_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_2_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_2_3 + +# Register _Matx_double_2_3 in _SH: +_SH._Matx_double_2_3_swigregister(_Matx_double_2_3) + +def _Matx_double_2_3_all(alpha): + return _SH._Matx_double_2_3_all(alpha) + +def _Matx_double_2_3_zeros(): + return _SH._Matx_double_2_3_zeros() + +def _Matx_double_2_3_ones(): + return _SH._Matx_double_2_3_ones() + +def _Matx_double_2_3_eye(): + return _SH._Matx_double_2_3_eye() + +def _Matx_double_2_3_randu(a, b): + return _SH._Matx_double_2_3_randu(a, b) + +def _Matx_double_2_3_randn(a, b): + return _SH._Matx_double_2_3_randn(a, b) + + +Matx23d = _Matx_double_2_3 + +class _Matx_float_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_3_2_rows + cols = _SH._Matx_float_3_2_cols + channels = _SH._Matx_float_3_2_channels + shortdim = _SH._Matx_float_3_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_3_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_3_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_3_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_3_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_3_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_3_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_3_2_ddot(self, v) + + def t(self): + return _SH._Matx_float_3_2_t(self) + + def mul(self, a): + return _SH._Matx_float_3_2_mul(self, a) + + def div(self, a): + return _SH._Matx_float_3_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_3_2___call__(self, i, j) + val = property(_SH._Matx_float_3_2_val_get, _SH._Matx_float_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_3_2_swiginit(self, _SH.new__Matx_float_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_3_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_3_2 + +# Register _Matx_float_3_2 in _SH: +_SH._Matx_float_3_2_swigregister(_Matx_float_3_2) + +def _Matx_float_3_2_all(alpha): + return _SH._Matx_float_3_2_all(alpha) + +def _Matx_float_3_2_zeros(): + return _SH._Matx_float_3_2_zeros() + +def _Matx_float_3_2_ones(): + return _SH._Matx_float_3_2_ones() + +def _Matx_float_3_2_eye(): + return _SH._Matx_float_3_2_eye() + +def _Matx_float_3_2_randu(a, b): + return _SH._Matx_float_3_2_randu(a, b) + +def _Matx_float_3_2_randn(a, b): + return _SH._Matx_float_3_2_randn(a, b) + + +Matx32f = _Matx_float_3_2 + +class _Matx_double_3_2(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_3_2_rows + cols = _SH._Matx_double_3_2_cols + channels = _SH._Matx_double_3_2_channels + shortdim = _SH._Matx_double_3_2_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_3_2_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_3_2_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_3_2_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_3_2_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_3_2_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_3_2_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_3_2_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_3_2_ddot(self, v) + + def t(self): + return _SH._Matx_double_3_2_t(self) + + def mul(self, a): + return _SH._Matx_double_3_2_mul(self, a) + + def div(self, a): + return _SH._Matx_double_3_2_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_3_2___call__(self, i, j) + val = property(_SH._Matx_double_3_2_val_get, _SH._Matx_double_3_2_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_3_2_swiginit(self, _SH.new__Matx_double_3_2(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_3_2___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_3_2 + +# Register _Matx_double_3_2 in _SH: +_SH._Matx_double_3_2_swigregister(_Matx_double_3_2) + +def _Matx_double_3_2_all(alpha): + return _SH._Matx_double_3_2_all(alpha) + +def _Matx_double_3_2_zeros(): + return _SH._Matx_double_3_2_zeros() + +def _Matx_double_3_2_ones(): + return _SH._Matx_double_3_2_ones() + +def _Matx_double_3_2_eye(): + return _SH._Matx_double_3_2_eye() + +def _Matx_double_3_2_randu(a, b): + return _SH._Matx_double_3_2_randu(a, b) + +def _Matx_double_3_2_randn(a, b): + return _SH._Matx_double_3_2_randn(a, b) + + +Matx32d = _Matx_double_3_2 + +class _Matx_float_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_3_3_rows + cols = _SH._Matx_float_3_3_cols + channels = _SH._Matx_float_3_3_channels + shortdim = _SH._Matx_float_3_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_3_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_3_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_3_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_3_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_3_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_3_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_3_3_ddot(self, v) + + def t(self): + return _SH._Matx_float_3_3_t(self) + + def mul(self, a): + return _SH._Matx_float_3_3_mul(self, a) + + def div(self, a): + return _SH._Matx_float_3_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_3_3___call__(self, i, j) + val = property(_SH._Matx_float_3_3_val_get, _SH._Matx_float_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_3_3_swiginit(self, _SH.new__Matx_float_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_3_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_3_3 + +# Register _Matx_float_3_3 in _SH: +_SH._Matx_float_3_3_swigregister(_Matx_float_3_3) + +def _Matx_float_3_3_all(alpha): + return _SH._Matx_float_3_3_all(alpha) + +def _Matx_float_3_3_zeros(): + return _SH._Matx_float_3_3_zeros() + +def _Matx_float_3_3_ones(): + return _SH._Matx_float_3_3_ones() + +def _Matx_float_3_3_eye(): + return _SH._Matx_float_3_3_eye() + +def _Matx_float_3_3_randu(a, b): + return _SH._Matx_float_3_3_randu(a, b) + +def _Matx_float_3_3_randn(a, b): + return _SH._Matx_float_3_3_randn(a, b) + + +Matx33f = _Matx_float_3_3 + +class _Matx_double_3_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_3_3_rows + cols = _SH._Matx_double_3_3_cols + channels = _SH._Matx_double_3_3_channels + shortdim = _SH._Matx_double_3_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_3_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_3_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_3_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_3_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_3_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_3_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_3_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_3_3_ddot(self, v) + + def t(self): + return _SH._Matx_double_3_3_t(self) + + def mul(self, a): + return _SH._Matx_double_3_3_mul(self, a) + + def div(self, a): + return _SH._Matx_double_3_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_3_3___call__(self, i, j) + val = property(_SH._Matx_double_3_3_val_get, _SH._Matx_double_3_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_3_3_swiginit(self, _SH.new__Matx_double_3_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_3_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_3_3 + +# Register _Matx_double_3_3 in _SH: +_SH._Matx_double_3_3_swigregister(_Matx_double_3_3) + +def _Matx_double_3_3_all(alpha): + return _SH._Matx_double_3_3_all(alpha) + +def _Matx_double_3_3_zeros(): + return _SH._Matx_double_3_3_zeros() + +def _Matx_double_3_3_ones(): + return _SH._Matx_double_3_3_ones() + +def _Matx_double_3_3_eye(): + return _SH._Matx_double_3_3_eye() + +def _Matx_double_3_3_randu(a, b): + return _SH._Matx_double_3_3_randu(a, b) + +def _Matx_double_3_3_randn(a, b): + return _SH._Matx_double_3_3_randn(a, b) + + +Matx33d = _Matx_double_3_3 + +class _Matx_float_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_3_4_rows + cols = _SH._Matx_float_3_4_cols + channels = _SH._Matx_float_3_4_channels + shortdim = _SH._Matx_float_3_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_3_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_3_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_3_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_3_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_3_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_3_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_3_4_ddot(self, v) + + def t(self): + return _SH._Matx_float_3_4_t(self) + + def mul(self, a): + return _SH._Matx_float_3_4_mul(self, a) + + def div(self, a): + return _SH._Matx_float_3_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_3_4___call__(self, i, j) + val = property(_SH._Matx_float_3_4_val_get, _SH._Matx_float_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_3_4_swiginit(self, _SH.new__Matx_float_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_3_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_3_4 + +# Register _Matx_float_3_4 in _SH: +_SH._Matx_float_3_4_swigregister(_Matx_float_3_4) + +def _Matx_float_3_4_all(alpha): + return _SH._Matx_float_3_4_all(alpha) + +def _Matx_float_3_4_zeros(): + return _SH._Matx_float_3_4_zeros() + +def _Matx_float_3_4_ones(): + return _SH._Matx_float_3_4_ones() + +def _Matx_float_3_4_eye(): + return _SH._Matx_float_3_4_eye() + +def _Matx_float_3_4_randu(a, b): + return _SH._Matx_float_3_4_randu(a, b) + +def _Matx_float_3_4_randn(a, b): + return _SH._Matx_float_3_4_randn(a, b) + + +Matx34f = _Matx_float_3_4 + +class _Matx_double_3_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_3_4_rows + cols = _SH._Matx_double_3_4_cols + channels = _SH._Matx_double_3_4_channels + shortdim = _SH._Matx_double_3_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_3_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_3_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_3_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_3_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_3_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_3_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_3_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_3_4_ddot(self, v) + + def t(self): + return _SH._Matx_double_3_4_t(self) + + def mul(self, a): + return _SH._Matx_double_3_4_mul(self, a) + + def div(self, a): + return _SH._Matx_double_3_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_3_4___call__(self, i, j) + val = property(_SH._Matx_double_3_4_val_get, _SH._Matx_double_3_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_3_4_swiginit(self, _SH.new__Matx_double_3_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_3_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_3_4 + +# Register _Matx_double_3_4 in _SH: +_SH._Matx_double_3_4_swigregister(_Matx_double_3_4) + +def _Matx_double_3_4_all(alpha): + return _SH._Matx_double_3_4_all(alpha) + +def _Matx_double_3_4_zeros(): + return _SH._Matx_double_3_4_zeros() + +def _Matx_double_3_4_ones(): + return _SH._Matx_double_3_4_ones() + +def _Matx_double_3_4_eye(): + return _SH._Matx_double_3_4_eye() + +def _Matx_double_3_4_randu(a, b): + return _SH._Matx_double_3_4_randu(a, b) + +def _Matx_double_3_4_randn(a, b): + return _SH._Matx_double_3_4_randn(a, b) + + +Matx34d = _Matx_double_3_4 + +class _Matx_float_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_4_3_rows + cols = _SH._Matx_float_4_3_cols + channels = _SH._Matx_float_4_3_channels + shortdim = _SH._Matx_float_4_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_4_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_4_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_4_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_4_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_4_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_4_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_4_3_ddot(self, v) + + def t(self): + return _SH._Matx_float_4_3_t(self) + + def mul(self, a): + return _SH._Matx_float_4_3_mul(self, a) + + def div(self, a): + return _SH._Matx_float_4_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_4_3___call__(self, i, j) + val = property(_SH._Matx_float_4_3_val_get, _SH._Matx_float_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_4_3_swiginit(self, _SH.new__Matx_float_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_4_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_4_3 + +# Register _Matx_float_4_3 in _SH: +_SH._Matx_float_4_3_swigregister(_Matx_float_4_3) + +def _Matx_float_4_3_all(alpha): + return _SH._Matx_float_4_3_all(alpha) + +def _Matx_float_4_3_zeros(): + return _SH._Matx_float_4_3_zeros() + +def _Matx_float_4_3_ones(): + return _SH._Matx_float_4_3_ones() + +def _Matx_float_4_3_eye(): + return _SH._Matx_float_4_3_eye() + +def _Matx_float_4_3_randu(a, b): + return _SH._Matx_float_4_3_randu(a, b) + +def _Matx_float_4_3_randn(a, b): + return _SH._Matx_float_4_3_randn(a, b) + + +Matx43f = _Matx_float_4_3 + +class _Matx_double_4_3(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_4_3_rows + cols = _SH._Matx_double_4_3_cols + channels = _SH._Matx_double_4_3_channels + shortdim = _SH._Matx_double_4_3_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_4_3_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_4_3_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_4_3_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_4_3_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_4_3_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_4_3_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_4_3_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_4_3_ddot(self, v) + + def t(self): + return _SH._Matx_double_4_3_t(self) + + def mul(self, a): + return _SH._Matx_double_4_3_mul(self, a) + + def div(self, a): + return _SH._Matx_double_4_3_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_4_3___call__(self, i, j) + val = property(_SH._Matx_double_4_3_val_get, _SH._Matx_double_4_3_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_4_3_swiginit(self, _SH.new__Matx_double_4_3(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_4_3___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_4_3 + +# Register _Matx_double_4_3 in _SH: +_SH._Matx_double_4_3_swigregister(_Matx_double_4_3) + +def _Matx_double_4_3_all(alpha): + return _SH._Matx_double_4_3_all(alpha) + +def _Matx_double_4_3_zeros(): + return _SH._Matx_double_4_3_zeros() + +def _Matx_double_4_3_ones(): + return _SH._Matx_double_4_3_ones() + +def _Matx_double_4_3_eye(): + return _SH._Matx_double_4_3_eye() + +def _Matx_double_4_3_randu(a, b): + return _SH._Matx_double_4_3_randu(a, b) + +def _Matx_double_4_3_randn(a, b): + return _SH._Matx_double_4_3_randn(a, b) + + +Matx43d = _Matx_double_4_3 + +class _Matx_float_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_4_4_rows + cols = _SH._Matx_float_4_4_cols + channels = _SH._Matx_float_4_4_channels + shortdim = _SH._Matx_float_4_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_4_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_4_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_4_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_4_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_4_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_4_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_4_4_ddot(self, v) + + def t(self): + return _SH._Matx_float_4_4_t(self) + + def mul(self, a): + return _SH._Matx_float_4_4_mul(self, a) + + def div(self, a): + return _SH._Matx_float_4_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_4_4___call__(self, i, j) + val = property(_SH._Matx_float_4_4_val_get, _SH._Matx_float_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_4_4_swiginit(self, _SH.new__Matx_float_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_4_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_4_4 + +# Register _Matx_float_4_4 in _SH: +_SH._Matx_float_4_4_swigregister(_Matx_float_4_4) + +def _Matx_float_4_4_all(alpha): + return _SH._Matx_float_4_4_all(alpha) + +def _Matx_float_4_4_zeros(): + return _SH._Matx_float_4_4_zeros() + +def _Matx_float_4_4_ones(): + return _SH._Matx_float_4_4_ones() + +def _Matx_float_4_4_eye(): + return _SH._Matx_float_4_4_eye() + +def _Matx_float_4_4_randu(a, b): + return _SH._Matx_float_4_4_randu(a, b) + +def _Matx_float_4_4_randn(a, b): + return _SH._Matx_float_4_4_randn(a, b) + + +Matx44f = _Matx_float_4_4 + +class _Matx_double_4_4(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_4_4_rows + cols = _SH._Matx_double_4_4_cols + channels = _SH._Matx_double_4_4_channels + shortdim = _SH._Matx_double_4_4_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_4_4_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_4_4_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_4_4_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_4_4_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_4_4_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_4_4_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_4_4_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_4_4_ddot(self, v) + + def t(self): + return _SH._Matx_double_4_4_t(self) + + def mul(self, a): + return _SH._Matx_double_4_4_mul(self, a) + + def div(self, a): + return _SH._Matx_double_4_4_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_4_4___call__(self, i, j) + val = property(_SH._Matx_double_4_4_val_get, _SH._Matx_double_4_4_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_4_4_swiginit(self, _SH.new__Matx_double_4_4(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_4_4___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_4_4 + +# Register _Matx_double_4_4 in _SH: +_SH._Matx_double_4_4_swigregister(_Matx_double_4_4) + +def _Matx_double_4_4_all(alpha): + return _SH._Matx_double_4_4_all(alpha) + +def _Matx_double_4_4_zeros(): + return _SH._Matx_double_4_4_zeros() + +def _Matx_double_4_4_ones(): + return _SH._Matx_double_4_4_ones() + +def _Matx_double_4_4_eye(): + return _SH._Matx_double_4_4_eye() + +def _Matx_double_4_4_randu(a, b): + return _SH._Matx_double_4_4_randu(a, b) + +def _Matx_double_4_4_randn(a, b): + return _SH._Matx_double_4_4_randn(a, b) + + +Matx44d = _Matx_double_4_4 + +class _Matx_float_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_float_6_6_rows + cols = _SH._Matx_float_6_6_cols + channels = _SH._Matx_float_6_6_channels + shortdim = _SH._Matx_float_6_6_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_float_6_6_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_float_6_6_zeros() + + @staticmethod + def ones(): + return _SH._Matx_float_6_6_ones() + + @staticmethod + def eye(): + return _SH._Matx_float_6_6_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_float_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_float_6_6_randn(a, b) + + def dot(self, v): + return _SH._Matx_float_6_6_dot(self, v) + + def ddot(self, v): + return _SH._Matx_float_6_6_ddot(self, v) + + def t(self): + return _SH._Matx_float_6_6_t(self) + + def mul(self, a): + return _SH._Matx_float_6_6_mul(self, a) + + def div(self, a): + return _SH._Matx_float_6_6_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_float_6_6___call__(self, i, j) + val = property(_SH._Matx_float_6_6_val_get, _SH._Matx_float_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_float_6_6_swiginit(self, _SH.new__Matx_float_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_float_6_6___str__(self) + __swig_destroy__ = _SH.delete__Matx_float_6_6 + +# Register _Matx_float_6_6 in _SH: +_SH._Matx_float_6_6_swigregister(_Matx_float_6_6) + +def _Matx_float_6_6_all(alpha): + return _SH._Matx_float_6_6_all(alpha) + +def _Matx_float_6_6_zeros(): + return _SH._Matx_float_6_6_zeros() + +def _Matx_float_6_6_ones(): + return _SH._Matx_float_6_6_ones() + +def _Matx_float_6_6_eye(): + return _SH._Matx_float_6_6_eye() + +def _Matx_float_6_6_randu(a, b): + return _SH._Matx_float_6_6_randu(a, b) + +def _Matx_float_6_6_randn(a, b): + return _SH._Matx_float_6_6_randn(a, b) + + +Matx66f = _Matx_float_6_6 + +class _Matx_double_6_6(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + rows = _SH._Matx_double_6_6_rows + cols = _SH._Matx_double_6_6_cols + channels = _SH._Matx_double_6_6_channels + shortdim = _SH._Matx_double_6_6_shortdim + + @staticmethod + def all(alpha): + return _SH._Matx_double_6_6_all(alpha) + + @staticmethod + def zeros(): + return _SH._Matx_double_6_6_zeros() + + @staticmethod + def ones(): + return _SH._Matx_double_6_6_ones() + + @staticmethod + def eye(): + return _SH._Matx_double_6_6_eye() + + @staticmethod + def randu(a, b): + return _SH._Matx_double_6_6_randu(a, b) + + @staticmethod + def randn(a, b): + return _SH._Matx_double_6_6_randn(a, b) + + def dot(self, v): + return _SH._Matx_double_6_6_dot(self, v) + + def ddot(self, v): + return _SH._Matx_double_6_6_ddot(self, v) + + def t(self): + return _SH._Matx_double_6_6_t(self) + + def mul(self, a): + return _SH._Matx_double_6_6_mul(self, a) + + def div(self, a): + return _SH._Matx_double_6_6_div(self, a) + + def __call__(self, i, j): + return _SH._Matx_double_6_6___call__(self, i, j) + val = property(_SH._Matx_double_6_6_val_get, _SH._Matx_double_6_6_val_set) + + import re + _re_pattern = re.compile("^_Matx_(?P[a-zA-Z_][a-zA-Z0-9_]*)_(?P[0-9]+)_(?P[0-9]+)$") + + + def __init__(self, *args): + + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + array = _array_map[value_type](rows*cols) + for i in range(len(args)): + array[i] = args[i] + + args = [array] + + + _SH._Matx_double_6_6_swiginit(self, _SH.new__Matx_double_6_6(*args)) + + def __getattribute__(self, name): + if name == "__array_interface__": + ma = self._re_pattern.match(self.__class__.__name__) + value_type = ma.group("value_type") + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + return {"shape": (rows, cols), + "typestr": _cv_numpy_typestr_map[value_type], + "data": (int(self.val), False)} + else: + return object.__getattribute__(self, name) + + + def __getitem__(self, key): + ma = self._re_pattern.match(self.__class__.__name__) + rows = int(ma.group("rows")) + cols = int(ma.group("cols")) + + if isinstance(key, int): + if rows != 1 and cols != 1: + raise IndexError + i = key + j = 0 + elif isinstance(key, tuple) and len(key) == 2: + i = key[0] + j = key[1] + else: + raise TypeError + + if i >= rows or j >= cols: + raise IndexError + + return self(i, j) + + + def __str__(self): + return _SH._Matx_double_6_6___str__(self) + __swig_destroy__ = _SH.delete__Matx_double_6_6 + +# Register _Matx_double_6_6 in _SH: +_SH._Matx_double_6_6_swigregister(_Matx_double_6_6) + +def _Matx_double_6_6_all(alpha): + return _SH._Matx_double_6_6_all(alpha) + +def _Matx_double_6_6_zeros(): + return _SH._Matx_double_6_6_zeros() + +def _Matx_double_6_6_ones(): + return _SH._Matx_double_6_6_ones() + +def _Matx_double_6_6_eye(): + return _SH._Matx_double_6_6_eye() + +def _Matx_double_6_6_randu(a, b): + return _SH._Matx_double_6_6_randu(a, b) + +def _Matx_double_6_6_randn(a, b): + return _SH._Matx_double_6_6_randn(a, b) + + +Matx66d = _Matx_double_6_6 + +class _Point__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Point__int_swiginit(self, _SH.new__Point__int(*args)) + + def dot(self, pt): + return _SH._Point__int_dot(self, pt) + + def ddot(self, pt): + return _SH._Point__int_ddot(self, pt) + + def cross(self, pt): + return _SH._Point__int_cross(self, pt) + x = property(_SH._Point__int_x_get, _SH._Point__int_x_set) + y = property(_SH._Point__int_y_get, _SH._Point__int_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _SH._Point__int___str__(self) + __swig_destroy__ = _SH.delete__Point__int + +# Register _Point__int in _SH: +_SH._Point__int_swigregister(_Point__int) + + +Point2i = _Point__int + +class _Point__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Point__float_swiginit(self, _SH.new__Point__float(*args)) + + def dot(self, pt): + return _SH._Point__float_dot(self, pt) + + def ddot(self, pt): + return _SH._Point__float_ddot(self, pt) + + def cross(self, pt): + return _SH._Point__float_cross(self, pt) + x = property(_SH._Point__float_x_get, _SH._Point__float_x_set) + y = property(_SH._Point__float_y_get, _SH._Point__float_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _SH._Point__float___str__(self) + __swig_destroy__ = _SH.delete__Point__float + +# Register _Point__float in _SH: +_SH._Point__float_swigregister(_Point__float) + + +Point2f = _Point__float + +class _Point__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Point__double_swiginit(self, _SH.new__Point__double(*args)) + + def dot(self, pt): + return _SH._Point__double_dot(self, pt) + + def ddot(self, pt): + return _SH._Point__double_ddot(self, pt) + + def cross(self, pt): + return _SH._Point__double_cross(self, pt) + x = property(_SH._Point__double_x_get, _SH._Point__double_x_set) + y = property(_SH._Point__double_y_get, _SH._Point__double_y_set) + + def __iter__(self): + return iter((self.x, self.y)) + + + def __str__(self): + return _SH._Point__double___str__(self) + __swig_destroy__ = _SH.delete__Point__double + +# Register _Point__double in _SH: +_SH._Point__double_swigregister(_Point__double) + + +Point2d = _Point__double + + +Point = Point2i + +class _Rect__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Rect__int_swiginit(self, _SH.new__Rect__int(*args)) + + def tl(self): + return _SH._Rect__int_tl(self) + + def br(self): + return _SH._Rect__int_br(self) + + def size(self): + return _SH._Rect__int_size(self) + + def area(self): + return _SH._Rect__int_area(self) + + def contains(self, pt): + return _SH._Rect__int_contains(self, pt) + x = property(_SH._Rect__int_x_get, _SH._Rect__int_x_set) + y = property(_SH._Rect__int_y_get, _SH._Rect__int_y_set) + width = property(_SH._Rect__int_width_get, _SH._Rect__int_width_set) + height = property(_SH._Rect__int_height_get, _SH._Rect__int_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _SH._Rect__int___str__(self) + __swig_destroy__ = _SH.delete__Rect__int + +# Register _Rect__int in _SH: +_SH._Rect__int_swigregister(_Rect__int) + + +Rect2i = _Rect__int + +class _Rect__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Rect__float_swiginit(self, _SH.new__Rect__float(*args)) + + def tl(self): + return _SH._Rect__float_tl(self) + + def br(self): + return _SH._Rect__float_br(self) + + def size(self): + return _SH._Rect__float_size(self) + + def area(self): + return _SH._Rect__float_area(self) + + def contains(self, pt): + return _SH._Rect__float_contains(self, pt) + x = property(_SH._Rect__float_x_get, _SH._Rect__float_x_set) + y = property(_SH._Rect__float_y_get, _SH._Rect__float_y_set) + width = property(_SH._Rect__float_width_get, _SH._Rect__float_width_set) + height = property(_SH._Rect__float_height_get, _SH._Rect__float_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _SH._Rect__float___str__(self) + __swig_destroy__ = _SH.delete__Rect__float + +# Register _Rect__float in _SH: +_SH._Rect__float_swigregister(_Rect__float) + + +Rect2f = _Rect__float + +class _Rect__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Rect__double_swiginit(self, _SH.new__Rect__double(*args)) + + def tl(self): + return _SH._Rect__double_tl(self) + + def br(self): + return _SH._Rect__double_br(self) + + def size(self): + return _SH._Rect__double_size(self) + + def area(self): + return _SH._Rect__double_area(self) + + def contains(self, pt): + return _SH._Rect__double_contains(self, pt) + x = property(_SH._Rect__double_x_get, _SH._Rect__double_x_set) + y = property(_SH._Rect__double_y_get, _SH._Rect__double_y_set) + width = property(_SH._Rect__double_width_get, _SH._Rect__double_width_set) + height = property(_SH._Rect__double_height_get, _SH._Rect__double_height_set) + + def __iter__(self): + return iter((self.x, self.y, self.width, self.height)) + + + def __str__(self): + return _SH._Rect__double___str__(self) + __swig_destroy__ = _SH.delete__Rect__double + +# Register _Rect__double in _SH: +_SH._Rect__double_swigregister(_Rect__double) + + +Rect2d = _Rect__double + + +Rect = Rect2i + +class _Scalar__double(_Vec_double_4): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Scalar__double_swiginit(self, _SH.new__Scalar__double(*args)) + + @staticmethod + def all(v0): + return _SH._Scalar__double_all(v0) + + def mul(self, a, scale=1): + return _SH._Scalar__double_mul(self, a, scale) + + def conj(self): + return _SH._Scalar__double_conj(self) + + def isReal(self): + return _SH._Scalar__double_isReal(self) + + def __iter__(self): + return iter((self(0), self(1), self(2), self(3))) + + def __getitem__(self, key): + if not isinstance(key, int): + raise TypeError + + if key >= 4: + raise IndexError + + return self(key) + + + def __str__(self): + return _SH._Scalar__double___str__(self) + __swig_destroy__ = _SH.delete__Scalar__double + +# Register _Scalar__double in _SH: +_SH._Scalar__double_swigregister(_Scalar__double) + +def _Scalar__double_all(v0): + return _SH._Scalar__double_all(v0) + + +Scalar4d = _Scalar__double + + +Scalar = Scalar4d + +class _Size__int(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Size__int_swiginit(self, _SH.new__Size__int(*args)) + + def area(self): + return _SH._Size__int_area(self) + width = property(_SH._Size__int_width_get, _SH._Size__int_width_set) + height = property(_SH._Size__int_height_get, _SH._Size__int_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _SH._Size__int___str__(self) + __swig_destroy__ = _SH.delete__Size__int + +# Register _Size__int in _SH: +_SH._Size__int_swigregister(_Size__int) + + +Size2i = _Size__int + +class _Size__float(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Size__float_swiginit(self, _SH.new__Size__float(*args)) + + def area(self): + return _SH._Size__float_area(self) + width = property(_SH._Size__float_width_get, _SH._Size__float_width_set) + height = property(_SH._Size__float_height_get, _SH._Size__float_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _SH._Size__float___str__(self) + __swig_destroy__ = _SH.delete__Size__float + +# Register _Size__float in _SH: +_SH._Size__float_swigregister(_Size__float) + + +Size2f = _Size__float + +class _Size__double(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, *args): + _SH._Size__double_swiginit(self, _SH.new__Size__double(*args)) + + def area(self): + return _SH._Size__double_area(self) + width = property(_SH._Size__double_width_get, _SH._Size__double_width_set) + height = property(_SH._Size__double_height_get, _SH._Size__double_height_set) + + def __iter__(self): + return iter((self.width, self.height)) + + + def __str__(self): + return _SH._Size__double___str__(self) + __swig_destroy__ = _SH.delete__Size__double + +# Register _Size__double in _SH: +_SH._Size__double_swigregister(_Size__double) + + +Size2d = _Size__double + + +Size = Size2i + + +def SH(file1, file2, outfile): + return _SH.SH(file1, file2, outfile) + + diff --git a/plugins/veg_method/scripts/__init__.py b/plugins/veg_method/scripts/__init__.py new file mode 100644 index 0000000..2572358 --- /dev/null +++ b/plugins/veg_method/scripts/__init__.py @@ -0,0 +1,690 @@ +from datetime import datetime +from osgeo import gdal +import math,os +import time +from PyQt5 import QtWidgets +from sklearn.cluster import k_means +from rscder.utils.geomath import geo2imageRC, imageRC2geo +from rscder.utils.project import Project, PairLayer +from misc import Register, AlgFrontend + +VEG_CD = Register('植被变化检测方法') + +import numpy as np +from .ACD import ACD +from .AHT import AHT +from .OCD import OCD +from .LHBA import LHBA +from .SH import SH + +def warp(file,ds:gdal.Dataset,srcWin=[0,0,0,0]): + driver = gdal.GetDriverByName('GTiff') + xsize=ds.RasterXSize + ysize=ds.RasterYSize + geo=ds.GetGeoTransform() + orj=ds.GetProjection() + band=ds.RasterCount + if os.path.exists(file): + os.remove(file) + out_ds:gdal.Dataset=driver.Create(file, xsize, ysize, band, gdal.GDT_Byte) + out_ds.SetGeoTransform(geo) + out_ds.SetProjection(orj) + for b in range(1,band+1): + out_ds.GetRasterBand(b).WriteArray(ds.ReadAsArray(*srcWin,band_list=[b]),*(0,0)) + del out_ds + +@VEG_CD.register +class BasicCD(AlgFrontend): + + @staticmethod + def get_name(): + return '差分法' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None,*args, **kargs): + + ds1:gdal.Dataset=gdal.Open(pth1) + ds2:gdal.Dataset=gdal.Open(pth2) + + cell_size = layer_parent.cell_size + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + + band = ds1.RasterCount + yblocks = ysize // cell_size[1] + + driver = gdal.GetDriverByName('GTiff') + out_tif = os.path.join(Project().other_path, 'temp.tif') + out_ds = driver.Create(out_tif, xsize, ysize, 1, gdal.GDT_Float32) + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + out_ds.SetGeoTransform(geo) + out_ds.SetProjection(proj) + + max_diff = 0 + min_diff = math.inf + + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + for j in range(yblocks + 1):#该改这里了 + if send_message is not None: + send_message.emit(f'计算{j}/{yblocks}') + block_xy1 = (start1x, start1y+j * cell_size[1]) + block_xy2 = (start2x,start2y+j*cell_size[1]) + block_xy=(0,j * cell_size[1]) + if block_xy1[1] > end1y or block_xy2[1] > end2y: + break + block_size=(xsize, cell_size[1]) + block_size1 = (xsize, cell_size[1]) + block_size2 = (xsize,cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + if block_xy1[1] + block_size1[1] > end1y: + block_size1 = (xsize,end1y - block_xy1[1]) + if block_xy2[1] + block_size2[1] > end2y: + block_size2 = (xsize, end2y - block_xy2[1]) + block_data1 = ds1.ReadAsArray(*block_xy1, *block_size1) + block_data2 = ds2.ReadAsArray(*block_xy2, *block_size2) + + if band == 1: + block_data1 = block_data1[None, ...] + block_data2 = block_data2[None, ...] + # pdb.set_trace() + block_diff = block_data1.sum(0) - block_data2.sum(0) + block_diff = block_diff.astype(np.float32) + block_diff = np.abs(block_diff) + + min_diff = min(min_diff, block_diff[block_diff > 0].min()) + max_diff = max(max_diff, block_diff.max()) + out_ds.GetRasterBand(1).WriteArray(block_diff, *block_xy) + if send_message is not None: + + send_message.emit(f'完成{j}/{yblocks}') + del ds2 + del ds1 + out_ds.FlushCache() + del out_ds + if send_message is not None: + send_message.emit('归一化概率中...') + temp_in_ds = gdal.Open(out_tif) + + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + out_normal_ds = driver.Create(out_normal_tif, xsize, ysize, 1, gdal.GDT_Byte) + out_normal_ds.SetGeoTransform(geo) + out_normal_ds.SetProjection(proj) + # hist = np.zeros(256, dtype=np.int32) + for j in range(yblocks+1): + block_xy = (0, j * cell_size[1]) + if block_xy[1] > ysize: + break + block_size = (xsize, cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + block_data = temp_in_ds.ReadAsArray(*block_xy, *block_size) + block_data = (block_data - min_diff) / (max_diff - min_diff) * 255 + block_data = block_data.astype(np.uint8) + out_normal_ds.GetRasterBand(1).WriteArray(block_data, *block_xy) + # hist_t, _ = np.histogram(block_data, bins=256, range=(0, 256)) + # hist += hist_t + # print(hist) + del temp_in_ds + del out_normal_ds + try: + os.remove(out_tif) + except: + pass + if send_message is not None: + send_message.emit('差分法计算完成') + return out_normal_tif + +@VEG_CD.register +class LSTS(AlgFrontend): + + @staticmethod + def get_name(): + return 'LSTS' + + @staticmethod + def get_widget(parent=None): + + widget = QtWidgets.QWidget(parent) + + return widget + + @staticmethod + def get_params(widget=None): + return dict(n=5, w_size=(3,3)) + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message=None,n=5,w_size=(3,3), *args, **kws): + ds1:gdal.Dataset=gdal.Open(pth1) + ds2:gdal.Dataset=gdal.Open(pth2) + + cell_size = layer_parent.cell_size + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + + band = ds1.RasterCount + yblocks = ysize // cell_size[1] + + driver = gdal.GetDriverByName('GTiff') + out_tif = os.path.join(Project().other_path, '%d.tif'%(int(datetime.now().timestamp() * 1000))) + out_ds = driver.Create(out_tif, xsize, ysize, 1, gdal.GDT_Float32) + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + out_ds.SetGeoTransform(geo) + out_ds.SetProjection(proj) + pixnum=w_size[0]*w_size[1] + # send_message.emit('pixnum:'pixnum) + max_diff = 0 + min_diff = math.inf + win_h=w_size[0]//2 #half hight of window + win_w=w_size[1]//2 #half width of window + a=[[(i+1)**j for j in range(n+1)] for i in range(pixnum)] + A=np.array(a).astype(np.float64)# + + k_=np.array(range(1,n+1)) + df1=np.zeros(pixnum).astype(np.float64) + df2=np.zeros(pixnum).astype(np.float64) + + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + for j in range(yblocks + 1): + if send_message is not None: + send_message.emit(f'计算{j}/{yblocks}') + block_xy1 = (start1x, start1y+j * cell_size[1]) + block_xy2 = (start2x,start2y+j*cell_size[1]) + block_xy=(0,j * cell_size[1]) + if block_xy1[1] > end1y or block_xy2[1] > end2y: + break + block_size=(xsize, cell_size[1]) + block_size1 = (xsize, cell_size[1]) + block_size2 = (xsize,cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + if block_xy1[1] + block_size1[1] > end1y: + block_size1 = (xsize,end1y - block_xy1[1]) + if block_xy2[1] + block_size2[1] > end2y: + block_size2 = (xsize, end2y - block_xy2[1]) + block_data1 = ds1.ReadAsArray(*block_xy1, *block_size1) + block_data2 = ds2.ReadAsArray(*block_xy2, *block_size2) + + if band == 1: + block_data1 = block_data1[None, ...] + block_data2 = block_data2[None, ...] + # pdb.set_trace() + else: + block_data1=np.mean(block_data1,0) + block_data2=np.mean(block_data2,0) + block_diff=np.zeros(block_data1.shape).astype(np.float64) + + for i in range(win_h,block_size1[1]-win_h): + for j_ in range(win_w,block_size1[0]-win_w): + pix=0 + + #get b + # b1=block_data[i+win_h:i+win_h] c in range(j_-win_w,j_+win_w+1) + b1=block_data1[i-win_h:i+win_h+1,j_-win_w:j_+win_w+1] + b2=block_data2[i-win_h:i+win_h+1,j_-win_w:j_+win_w+1] + b1=[b if (r+1)//2 else b[::-1] for r,b in enumerate(b1)] + b2=[b if (r+1)//2 else b[::-1] for r,b in enumerate(b2)] + b1=np.expand_dims(np.concatenate(b1,0),1) + b2=np.expand_dims(np.concatenate(b2,0),1) + + x1=np.squeeze(np.linalg.pinv(A).dot(b1)) + x2=np.squeeze(np.linalg.pinv(A).dot(b2)) + #df + k_=range(1,n+1) + for pix in range(1,pixnum+1): + df1[pix-1]=x1[1:n+1].dot(np.array([k*(pix**(k-1)) for k in k_])) + df2[pix-1]=x2[1:n+1].dot(np.array([k*(pix**(k-1)) for k in k_])) + + #distance 欧式距离 + block_diff[i][j_]=np.dot(df1-df2,df1-df2)**0.5 + + min_diff = min(min_diff, block_diff[block_diff > 0].min()) + max_diff = max(max_diff, block_diff.max()) + out_ds.GetRasterBand(1).WriteArray(block_diff, *block_xy) + + send_message.emit(f'完成{j}/{yblocks}') + del ds2 + del ds1 + out_ds.FlushCache() + del out_ds + if send_message is not None: + send_message.emit('归一化概率中...') + temp_in_ds = gdal.Open(out_tif) + + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + out_normal_ds = driver.Create(out_normal_tif, xsize, ysize, 1, gdal.GDT_Byte) + out_normal_ds.SetGeoTransform(geo) + out_normal_ds.SetProjection(proj) + # hist = np.zeros(256, dtype=np.int32) + for j in range(yblocks+1): + block_xy = (0, j * cell_size[1]) + if block_xy[1] > ysize: + break + block_size = (xsize, cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + block_data = temp_in_ds.ReadAsArray(*block_xy, *block_size) + block_data = (block_data - min_diff) / (max_diff - min_diff) * 255 + block_data = block_data.astype(np.uint8) + out_normal_ds.GetRasterBand(1).WriteArray(block_data, *block_xy) + # hist_t, _ = np.histogram(block_data, bins=256, range=(0, 256)) + # hist += hist_t + # print(hist) + del temp_in_ds + del out_normal_ds + try: + os.remove(out_tif) + except: + pass + + if send_message is not None: + send_message.emit('LSTS法计算完成') + return out_normal_tif + + +@VEG_CD.register +class CVAAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'CVA' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + ds1:gdal.Dataset=gdal.Open(pth1) + ds2:gdal.Dataset=gdal.Open(pth2) + + cell_size = layer_parent.cell_size + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + + band = ds1.RasterCount + yblocks = ysize // cell_size[1] + + driver = gdal.GetDriverByName('GTiff') + out_tif = os.path.join(Project().other_path, 'temp.tif') + out_ds = driver.Create(out_tif, xsize, ysize, 1, gdal.GDT_Float32) + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + out_ds.SetGeoTransform(geo) + out_ds.SetProjection(proj) + max_diff = 0 + min_diff = math.inf + + + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + + for j in range(yblocks + 1): + if send_message is not None: + send_message.emit(f'计算{j}/{yblocks}') + block_xy1 = (start1x, start1y+j * cell_size[1]) + block_xy2 = (start2x,start2y+j*cell_size[1]) + block_xy=(0,j * cell_size[1]) + if block_xy1[1] > end1y or block_xy2[1] > end2y: + break + block_size=(xsize, cell_size[1]) + block_size1 = (xsize, cell_size[1]) + block_size2 = (xsize,cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + if block_xy1[1] + block_size1[1] > end1y: + block_size1 = (xsize,end1y - block_xy1[1]) + if block_xy2[1] + block_size2[1] > end2y: + block_size2 = (xsize, end2y - block_xy2[1]) + block_data1 = ds1.ReadAsArray(*block_xy1, *block_size1) + block_data2 = ds2.ReadAsArray(*block_xy2, *block_size2) + + if band == 1: + block_data1 = block_data1[None, ...] + block_data2 = block_data2[None, ...] + # pdb.set_trace() + block_diff=np.sum((block_data1-block_data2)**2,0)**0.5 + min_diff = min(min_diff, block_diff[block_diff > 0].min()) + max_diff = max(max_diff, block_diff.max()) + out_ds.GetRasterBand(1).WriteArray(block_diff, *block_xy) + if send_message is not None: + send_message.emit(f'完成{j}/{yblocks}') + del ds2 + del ds1 + out_ds.FlushCache() + del out_ds + if send_message is not None: + send_message.emit('归一化概率中...') + temp_in_ds = gdal.Open(out_tif) + + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + out_normal_ds = driver.Create(out_normal_tif, xsize, ysize, 1, gdal.GDT_Byte) + out_normal_ds.SetGeoTransform(geo) + out_normal_ds.SetProjection(proj) + # hist = np.zeros(256, dtype=np.int32) + for j in range(yblocks+1): + block_xy = (0, j * cell_size[1]) + if block_xy[1] > ysize: + break + block_size = (xsize, cell_size[1]) + if block_xy[1] + block_size[1] > ysize: + block_size = (xsize, ysize - block_xy[1]) + block_data = temp_in_ds.ReadAsArray(*block_xy, *block_size) + block_data = (block_data - min_diff) / (max_diff - min_diff) * 255 + block_data = block_data.astype(np.uint8) + out_normal_ds.GetRasterBand(1).WriteArray(block_data, *block_xy) + # hist_t, _ = np.histogram(block_data, bins=256, range=(0, 256)) + # hist += hist_t + # print(hist) + del temp_in_ds + del out_normal_ds + try: + os.remove(out_tif) + except: + pass + if send_message is not None: + send_message.emit('欧式距离计算完成') + return out_normal_tif + +@VEG_CD.register +class ACDAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'ACD' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + # send_message.emit = print + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + + + #运算 + send_message.emit('开始ACD计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + ACD(temp_tif1,temp_tif2,out_normal_tif) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + + return out_normal_tif + + +@VEG_CD.register +class AHTAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'AHT' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + + + #运算 + send_message.emit('开始AHT计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + AHT(temp_tif1,temp_tif2,out_normal_tif) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + + return out_normal_tif + + +@VEG_CD.register +class OCDAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'OCD' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + + + #运算 + send_message.emit('开始OCD计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + OCD(temp_tif1,temp_tif2,out_normal_tif,Project().other_path) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + + return out_normal_tif + +@VEG_CD.register +class LHBAAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'LHBA' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + #运算 + send_message.emit('开始LHBA计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + LHBA(temp_tif1,temp_tif2,out_normal_tif) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + return out_normal_tif + + +@VEG_CD.register +class SHAlg(AlgFrontend): + + @staticmethod + def get_name(): + return 'SH' + + @staticmethod + def run_alg(pth1:str,pth2:str,layer_parent:PairLayer,send_message = None, *args, **kargs): + + if send_message is None: + class Empty: + + def emit(self, *args, **kws): + print(args) + send_message = Empty() + + + + xsize = layer_parent.size[0] + ysize = layer_parent.size[1] + geo=layer_parent.grid.geo + proj=layer_parent.grid.proj + #提取公共部分 + send_message.emit('提取重叠区域数据.....') + + ds2:gdal.Dataset=gdal.Open(pth2) + temp_tif2 = os.path.join(Project().other_path,'temp2.tif') + start2x,start2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end2x,end2y=geo2imageRC(ds2.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif2,ds2,srcWin=[start2x,start2y,xsize,ysize]) + del ds2 + send_message.emit('图像二提取完成') + + + ds1:gdal.Dataset=gdal.Open(pth1) + temp_tif1 = os.path.join(Project().other_path, 'temp1.tif') + start1x,start1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[0],layer_parent.mask.xy[1]) + end1x,end1y=geo2imageRC(ds1.GetGeoTransform(),layer_parent.mask.xy[2],layer_parent.mask.xy[3]) + warp(temp_tif1,ds1,srcWin=[start1x,start1y,xsize,ysize]) + del ds1 + send_message.emit('图像一提取完成') + + #运算 + send_message.emit('开始SH计算.....') + time.sleep(0.1) + out_normal_tif = os.path.join(Project().cmi_path, '{}_{}_cmi.tif'.format(layer_parent.name, int(np.random.rand() * 100000))) + SH(temp_tif1,temp_tif2,out_normal_tif) + #添加投影 + send_message.emit('录入投影信息.....') + time.sleep(0.1) + ds=gdal.Open(out_normal_tif,1) + ds.SetGeoTransform(geo) + ds.SetProjection(proj) + del ds + return out_normal_tif diff --git a/rscder/gui/actions.py b/rscder/gui/actions.py index a0d50b0..c524810 100644 --- a/rscder/gui/actions.py +++ b/rscder/gui/actions.py @@ -2,7 +2,8 @@ import logging import os from pathlib import Path from PyQt5 import QtCore, QtGui, QtWidgets -from PyQt5.QtWidgets import QAction, QActionGroup, QLabel, QFileDialog, QMenuBar +from PyQt5.QtCore import Qt, QSize, QSettings, pyqtSignal +from PyQt5.QtWidgets import QAction, QActionGroup, QLabel, QFileDialog, QMenuBar, QToolBar, QVBoxLayout, QComboBox from rscder.gui import project from rscder.gui.project import Create from rscder.utils.icons import IconInstance @@ -20,18 +21,20 @@ class ActionManager(QtCore.QObject): instance = None def __init__(self, - double_map, - layer_tree, - follow_box, - result_box, - message_box, - parent=None): + double_map, + layer_tree, + follow_box, + result_box, + message_box, + parent=None): super().__init__(parent) self.w_parent = parent self.actions = {} self.action_groups = {} self.action_group_actions = {} + self.toolbars = {} + self.double_map = double_map self.layer_tree = layer_tree self.follow_box = follow_box @@ -52,7 +55,7 @@ class ActionManager(QtCore.QObject): self.basic_menu = menubar.addMenu( '&基础工具') self.filter_menu = self.basic_menu.addMenu(IconInstance().FILTER, '&滤波处理') self.change_detection_menu = menubar.addMenu('&通用变化检测') - self.unsupervised_menu = self.change_detection_menu.addMenu(IconInstance().UNSUPERVISED, '&无监督变化检测') + # self.unsupervised_menu = self.change_detection_menu.addMenu(IconInstance().UNSUPERVISED, '&无监督变化检测') self.supervised_menu = self.change_detection_menu.addMenu(IconInstance().SUPERVISED,'&监督变化检测') self.ai_menu = self.change_detection_menu.addMenu(IconInstance().AI_DETECT,'&AI变化检测') self.special_chagne_detec_menu = menubar.addMenu( '&专题变化检测') @@ -73,10 +76,28 @@ class ActionManager(QtCore.QObject): self.plugin_menu = menubar.addMenu('&插件') self.help_menu = menubar.addMenu( '&帮助') + # vbox = QVBoxLayout() + # follow_combox = QComboBox(self.follow_box) + # vbox.addWidget(follow_combox) + # self.follow_box.setLayout(vbox) + + def set_toolbar(self, toolbar): - self.toolbar = toolbar + self.toolbar:QToolBar = toolbar self.toolbar.setIconSize(QtCore.QSize(24, 24)) - + + def add_toolbar(self, name=None): + + toolbar = self.w_parent.addToolBar(name) + toolbar.setMovable(True) + toolbar.setFloatable(False) + toolbar.setIconSize(QSize(32, 32)) + toolbar.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) + toolbar.setContextMenuPolicy(Qt.PreventContextMenu) + toolbar.setLayoutDirection(Qt.LeftToRight) + + return toolbar + def set_status_bar(self, status_bar): self.status_bar = status_bar @@ -131,6 +152,9 @@ class ActionManager(QtCore.QObject): zomm_out.setChecked(False) zomm_in.setCheckable(True) zomm_in.setChecked(False) + + toolbar = self.add_toolbar('Map') + toolbar.addActions([pan, zomm_out, zomm_in, locate]) self.double_map.connect_map_tool(pan, zomm_in, zomm_out) # self.double_map.connect_grid_show(grid_line) @@ -148,6 +172,9 @@ class ActionManager(QtCore.QObject): plugin_list = self.add_action(QAction(IconInstance().PLUGINS,'&插件列表', self.w_parent), 'Plugin') plugin_list.triggered.connect(self.plugin_list) + # toolbar = self.add_toolbar('Plugin') + # toolbar.addAction(plugin_list) + self.plugin_menu.addAction(plugin_list) self.message_box.info('菜单初始化完成') diff --git a/rscder/gui/keygen.py b/rscder/gui/keygen.py index 6fd1298..ab26f78 100644 --- a/rscder/gui/keygen.py +++ b/rscder/gui/keygen.py @@ -47,8 +47,8 @@ class LicenseGen(QDialog): self.btn_cancel.clicked.connect(self.reject) hbox4 = QHBoxLayout() - hbox4.addWidget(self.btn_generate, alignment = QtCore.Qt.AlignRight, stretch= 0) - hbox4.addWidget(self.btn_cancel, alignment = QtCore.Qt.AlignRight, stretch= 0) + hbox4.addWidget(self.btn_generate, alignment = QtCore.Qt.AlignCenter, stretch= 0) + hbox4.addWidget(self.btn_cancel, alignment = QtCore.Qt.AlignCenter, stretch= 0) vbox = QVBoxLayout() vbox.addLayout(hbox1) diff --git a/rscder/gui/layercombox.py b/rscder/gui/layercombox.py index e6267c2..3450221 100644 --- a/rscder/gui/layercombox.py +++ b/rscder/gui/layercombox.py @@ -1,5 +1,6 @@ from PyQt5.QtWidgets import QComboBox, QWidget, QLabel, QHBoxLayout, QVBoxLayout from PyQt5.QtGui import QIcon +from PyQt5.QtCore import Qt from rscder.utils.icons import IconInstance from rscder.utils.project import PairLayer, Project, RasterLayer, ResultPointLayer,SingleBandRasterLayer class LayerCombox(QComboBox): @@ -7,6 +8,7 @@ class LayerCombox(QComboBox): def __init__(self, parent=None): super().__init__(parent) self.addItem('---', None) + self.setMinimumWidth(200) for layer in Project().layers.values(): self.addItem(IconInstance().LAYER, layer.name, layer.id) @@ -34,8 +36,9 @@ class PairLayerCombox(QWidget): layer_label = QLabel('图层组:') hbox = QHBoxLayout() + hbox.setAlignment(Qt.AlignLeft) hbox.addWidget(layer_label) - hbox.addWidget(self.layer_combox) + hbox.addWidget(self.layer_combox, 2) self.raster_layer1 = QComboBox(self) self.raster_layer1.addItem('---', None) @@ -49,12 +52,14 @@ class PairLayerCombox(QWidget): self.layer_combox.currentIndexChanged.connect(self.on_group_changed) hbox1 = QHBoxLayout() + hbox1.setAlignment(Qt.AlignLeft) hbox1.addWidget(QLabel('时相1:')) - hbox1.addWidget(self.raster_layer1) + hbox1.addWidget(self.raster_layer1, 2) hbox2 = QHBoxLayout() + hbox2.setAlignment(Qt.AlignLeft) hbox2.addWidget(QLabel('时相2:')) - hbox2.addWidget(self.raster_layer2) + hbox2.addWidget(self.raster_layer2, 2) vbox = QVBoxLayout() vbox.addLayout(hbox) diff --git a/rscder/gui/load.py b/rscder/gui/load.py index fc5468f..5f1712b 100644 --- a/rscder/gui/load.py +++ b/rscder/gui/load.py @@ -1,10 +1,11 @@ from colorsys import hls_to_rgb import os +from turtle import width from osgeo import gdal from PyQt5.QtWidgets import QWidget, QApplication, QMainWindow, QToolBox -from PyQt5.QtWidgets import QDialog, QFileDialog, QLineEdit, QPushButton, QVBoxLayout, QHBoxLayout, QLabel, QMessageBox,QSpacerItem +from PyQt5.QtWidgets import QDialog, QFileDialog, QLineEdit, QPushButton, QVBoxLayout, QHBoxLayout, QLabel, QMessageBox,QSpacerItem,QDialogButtonBox from PyQt5.QtCore import Qt, QSize,QSettings,pyqtSignal,QThread -from PyQt5.QtGui import QIcon,QColor +from PyQt5.QtGui import QIcon,QColor,QPalette,QPixmap from PyQt5 import QtGui from threading import Thread from rscder.utils.icons import IconInstance @@ -38,6 +39,8 @@ class loader(QDialog): signal1=pyqtSignal(str) def __init__(self, parent=None) -> None: super().__init__(parent) + self.left_layer=None + self.right_layer=None self.setWindowTitle('载入数据') self.setWindowIcon(IconInstance().DATA_LOAD) self.pyramid:bool=False @@ -46,18 +49,20 @@ class loader(QDialog): self.path1='' self.path2='' self.bands=['red:','green:','blue:','NIR:'] - self.bandsorder=[3,2,1,4] - self.mapcanva1 = QgsMapCanvas(self) - self.mapcanva2 = QgsMapCanvas(self) - self.mapcanva1.setCanvasColor(QColor(0, 0, 0)) - self.mapcanva2.setCanvasColor(QColor(0, 0, 0)) - self.mapcanva1.setFixedWidth(200) - self.mapcanva1.setFixedHeight(200) - self.mapcanva2.setFixedWidth(200) - self.mapcanva2.setFixedHeight(200) + self.bandsorder=[1,2,3,4] + + self.left_map=QLabel() + self.left_map.setFixedSize(200,200) + self.left_map.setAutoFillBackground(True) + self.left_map.setBackgroundRole(QPalette.Dark) + + self.right_map=QLabel() + self.right_map.setFixedSize(200,200) + self.right_map.setAutoFillBackground(True) + self.right_map.setBackgroundRole(QPalette.Dark) maplayout=QHBoxLayout() - maplayout.addWidget(self.mapcanva1) - maplayout.addWidget(self.mapcanva2) + maplayout.addWidget(self.left_map) + maplayout.addWidget(self.right_map) path1_label = QLabel('时相1影像:') path1_label.setFixedWidth(60) @@ -145,11 +150,16 @@ class loader(QDialog): ok_button.clicked.connect(self.ok) cancel_button.clicked.connect(self.cancel) - - button_layout = QHBoxLayout() - button_layout.setDirection(QHBoxLayout.RightToLeft) - button_layout.addWidget(cancel_button, 0, Qt.AlignRight) - button_layout.addWidget(ok_button, 0, Qt.AlignRight) + ok_button.setDefault(True) + cancel_button.setDefault(False) + buttonbox=QDialogButtonBox(self) + buttonbox.addButton(ok_button,QDialogButtonBox.NoRole) + buttonbox.addButton(cancel_button,QDialogButtonBox.NoRole) + buttonbox.setCenterButtons(True) + # button_layout = QHBoxLayout() + # button_layout.setDirection(QHBoxLayout.RightToLeft) + # button_layout.addWidget(cancel_button, 0, Qt.AlignCenter) + # button_layout.addWidget(ok_button, 0, Qt.AlignCenter) main_layout = QVBoxLayout() main_layout.addLayout(path1_layout) @@ -157,7 +167,8 @@ class loader(QDialog): main_layout.addLayout(path2_layout) main_layout.addLayout(style2_layout) main_layout.addLayout(maplayout) - main_layout.addLayout(button_layout) + main_layout.addWidget(buttonbox) + # main_layout.addLayout(button_layout) self.setLayout(main_layout) def open_file1(self): @@ -171,24 +182,23 @@ class loader(QDialog): if result==QMessageBox.Yes: progress1:QDialog=progressDialog(self,'加载时相一') progress1.setModal(False) - self.temp1=os.path.join(Project().other_path,'temp1.tif') - t1=GdalPreviewImage(self.path1,self.temp1,1024,self.parent()) - # t1.started.connect(progress1.show) - t1.finished.connect(self.loadfile1) - t1.finished.connect(lambda :self.setlabel(progress1) ) + self.left_layer=MultiBandRasterLayer(path=self.path1) + t1=GdalPreviewImage(self.left_layer,self.left_map,width=200,parent=self.parent()) + t1.finished.connect(lambda :self.setlabel(progress1)) t2=build_pyramids_overviews(self.path1,self.parent()) t2.finished.connect(progress1.hide) - t1.start() t1.finished.connect(t2.start) + t1.finished.connect(lambda : self.open1.setEnabled(True)) + t1.start() # t2.start() progress1.show() else: progress1=progressDialog(self,'加载时相一') progress1.setModal(False) - self.temp1=os.path.join(Project().other_path,'temp1.tif') - t1=GdalPreviewImage(self.path1,self.temp1,1024,self.parent()) + self.left_layer=MultiBandRasterLayer(path=self.path1) + t1=GdalPreviewImage(self.left_layer,self.left_map,width=200,parent=self.parent()) # t1.started.connect(progress1.show) - t1.finished.connect(self.loadfile1) + t1.finished.connect(lambda : self.open1.setEnabled(True)) t1.finished.connect(progress1.hide) t1.start() progress1.show() @@ -196,14 +206,7 @@ class loader(QDialog): except: return - def loadfile1(self): - try: - self.left_layer=MultiBandRasterLayer(path=self.temp1) - self.mapcanva1.setLayers([self.left_layer.layer]) - self.mapcanva1.zoomToFeatureExtent(self.left_layer.layer.extent()) - self.open1.setEnabled(True) - except: - return + def open_file2(self): path2 = QFileDialog.getOpenFileNames(self, '打开数据2', Settings.General().last_path, '*.*') if path2[0]!='': @@ -216,12 +219,14 @@ class loader(QDialog): progress2=progressDialog(self,'加载时相二') progress2.setModal(False) # progress1.show - self.temp2=os.path.join(Project().other_path,'temp2.tif') - t1=GdalPreviewImage(self.path2,self.temp2,1024,self.parent()) - + self.right_layer=MultiBandRasterLayer(path=self.path2) + + t1=GdalPreviewImage(self.right_layer,self.right_map,width=200,parent=self.parent()) + # t1.started.connect(progress1.show) - t1.finished.connect(self.loadfile2) + t1.finished.connect(lambda :self.open2.setEnabled(True)) t1.finished.connect(lambda :self.setlabel(progress2)) + t2=build_pyramids_overviews(self.path2,self.parent()) t2.finished.connect(progress2.hide) t1.start() @@ -230,24 +235,15 @@ class loader(QDialog): else: progress2=progressDialog(self,'加载时相二') progress2.setModal(False) - self.temp2=os.path.join(Project().other_path,'temp2.tif') - t1=GdalPreviewImage(self.path2,self.temp2,1024,self.parent()) + self.right_layer=MultiBandRasterLayer(path=self.path2) + t1=GdalPreviewImage(self.right_layer,self.right_map,width=200,parent=self.parent()) + # t1.started.connect(progress1.show) - t1.finished.connect(self.loadfile2) + t1.finished.connect(lambda :self.open2.setEnabled(True)) t1.finished.connect(progress2.hide) t1.start() progress2.show() - - - def loadfile2(self): - try: - self.right_layer=MultiBandRasterLayer(path=self.temp2) - self.mapcanva2.setLayers([self.right_layer.layer]) - self.mapcanva2.zoomToFeatureExtent(self.right_layer.layer.extent()) - self.open2.setEnabled(True) - except: - return def ok(self): self.bandsorder1=[int(q.text()) for q in self.style1_inputs ] self.style1={'r':self.bandsorder1[0],'g':self.bandsorder1[1],'b':self.bandsorder1[2],'NIR':self.bandsorder1[3]} @@ -265,8 +261,7 @@ class loader(QDialog): def cancel(self): self.reject() - def open_alg(self,path): - pass + def setlabel(self,s): try: s.setlabel('创建影像金字塔..') @@ -276,72 +271,22 @@ class loader(QDialog): self.bandsorder1=[int(q.text()) for q in self.style1_inputs ] self.style1={'r':self.bandsorder1[0],'g':self.bandsorder1[1],'b':self.bandsorder1[2],'NIR':self.bandsorder1[3]} self.left_layer.set_stlye(self.style1) + self.left_map.setPixmap(self.left_layer.previewAsPixmapo(width=200)) def set_style2(self): self.bandsorder2=[int(q.text()) for q in self.style2_inputs ] self.style2={'r':self.bandsorder2[0],'g':self.bandsorder2[1],'b':self.bandsorder2[2],'NIR':self.bandsorder2[3]} self.right_layer.set_stlye(self.style2) + self.right_map.setPixmap(self.right_layer.previewAsPixmapo(width=200)) class GdalPreviewImage(QThread): - def __init__(self,srcFile,tarFilename,width=1024.0,parent=None) -> None: + def __init__(self,layer,map,width=200,parent=None) -> None: super(GdalPreviewImage,self).__init__(parent) - self.srcFile=srcFile - self.tarFilename=tarFilename + self.layer=layer + self.map=map self.width=width def run(self): - try: - srcFile=self.srcFile - tarFilename=self.tarFilename - width=self.width - p=tarFilename - dataset = gdal.Open(srcFile, gdal.GA_ReadOnly) - srcProjection = dataset.GetProjection() - srcGeoTransform = dataset.GetGeoTransform() - srcWidth = dataset.RasterXSize - srcHeight = dataset.RasterYSize - srcBandCount = dataset.RasterCount - # srcNoDatas = [ - # dataset.GetRasterBand(bandIndex).GetNoDataValue() - # for bandIndex in range(1, srcBandCount+1) - # ] - # print(srcNoDatas) - srcBandDataType = dataset.GetRasterBand(1).DataType - # 创建重采样后的栅格 - outFilePath = p - resampleFactor=width/srcWidth - driver = gdal.GetDriverByName('GTiff') - outWidth = int(srcWidth * resampleFactor) - outHeight = int(srcHeight * resampleFactor) - outDataset = driver.Create( - outFilePath, - outWidth, - outHeight, - srcBandCount, - srcBandDataType - ) - print(outDataset) - geoTransforms = list(srcGeoTransform) - geoTransforms[1] = geoTransforms[1]/resampleFactor - geoTransforms[5] = geoTransforms[5]/resampleFactor - outGeoTransform = tuple(geoTransforms) - outDataset.SetGeoTransform(outGeoTransform) - outDataset.SetProjection(srcProjection) - # for bandIndex in range(1, srcBandCount+1): - # band = outDataset.GetRasterBand(bandIndex) - # band.SetNoDataValue(srcNoDatas[bandIndex-1]) - gdal.ReprojectImage( - dataset, - outDataset, - srcProjection, - srcProjection, - gdal.gdalconst.GRA_NearestNeighbour, - 0.0, 0.0, - ) - del outDataset - except: - pass - - # return outFilePath + self.map.setPixmap(self.layer.previewAsPixmapo(width=self.width)) class build_pyramids_overviews(QThread): diff --git a/rscder/gui/mainwindow.py b/rscder/gui/mainwindow.py index 919cc39..4902c01 100644 --- a/rscder/gui/mainwindow.py +++ b/rscder/gui/mainwindow.py @@ -15,10 +15,7 @@ from rscder.utils.icons import IconInstance from rscder.utils.project import Project from rscder.gui.layercombox import LayerCombox from rscder.gui.eagle_eye import eagleEye -import skimage -import numpy as np -import sys -import scipy + class MainWindow(QMainWindow): closed = pyqtSignal() diff --git a/rscder/gui/project.py b/rscder/gui/project.py index fb28dd5..187db32 100644 --- a/rscder/gui/project.py +++ b/rscder/gui/project.py @@ -92,8 +92,8 @@ class Create(QDialog): button_layout = QHBoxLayout() button_layout.setDirection(QHBoxLayout.RightToLeft) - button_layout.addWidget(ok_button, 0, Qt.AlignRight) - button_layout.addWidget(cancel_button, 0, Qt.AlignRight) + button_layout.addWidget(ok_button, 0, Qt.AlignHCenter) + button_layout.addWidget(cancel_button, 0, Qt.AlignHCenter) main_layout = QVBoxLayout() main_layout.addLayout(file_input_layout) diff --git a/rscder/plugins/loader.py b/rscder/plugins/loader.py index 87ceffe..5ce875b 100644 --- a/rscder/plugins/loader.py +++ b/rscder/plugins/loader.py @@ -62,7 +62,10 @@ class PluginLoader(QObject): self.plugins.append(obj(self.ctx)) break except Exception as e: + # import traceback + # traceback.print_exc() self.ctx['message_box'].error(f'{plugin["name"]} load error: {e}') + self.plugin_loaded.emit() \ No newline at end of file diff --git a/rscder/utils/geomath.py b/rscder/utils/geomath.py new file mode 100644 index 0000000..994a315 --- /dev/null +++ b/rscder/utils/geomath.py @@ -0,0 +1,19 @@ + +def imageRC2geo(geo:list,x,y): + ''' + 根据GDAL的六参数模型将影像图上坐标(行列号)转为投影坐标或地理坐标(根据具体数据的坐标系统转换) + :param geo: GDAL地理数据,getGeotransform + ''' + trans = geo + px = trans[0] + x * trans[1] + y * trans[2] + py = trans[3] + x * trans[4] + y * trans[5] + return [px, py] + +def geo2imageRC(geo:list,px,py): + ''' + 根据GDAL的六 参数模型将给定的投影或地理坐标转为影像图上坐标(行列号),return x,y + ''' + dTemp = geo[1] * geo[5] - geo[2] *geo[4] + x= int((geo[5] * (px - geo[0]) -geo[2] * (py - geo[3])) / dTemp + 0.5) + y = int((geo[1] * (py - geo[3]) -geo[4] * (px - geo[0])) / dTemp + 0.5) + return [x,y] \ No newline at end of file diff --git a/rscder/utils/project.py b/rscder/utils/project.py index 50152bd..ee2ef97 100644 --- a/rscder/utils/project.py +++ b/rscder/utils/project.py @@ -8,6 +8,7 @@ from pathlib import Path from pydoc import render_doc import shutil from statistics import stdev +from tabnanny import check from threading import Thread from time import sleep, time from typing import Dict, List @@ -26,9 +27,9 @@ from qgis.core import (\ QgsGeometry, QgsPointXY, QgsMultiBandColorRenderer) from PyQt5.QtCore import QObject, pyqtSignal, Qt, QThread,QSize from PyQt5.QtWidgets import QTreeWidgetItem, QAction,QMessageBox -from PyQt5.QtGui import QColor, QIcon, QFont +from PyQt5.QtGui import QColor, QIcon, QFont,QPixmap import yaml - +from rscder.utils.geomath import geo2imageRC,imageRC2geo from .misc import singleton def relative_path(path: str, root:str) -> str: return os.path.relpath(path, root) @@ -235,6 +236,7 @@ def from_dict(data:dict): if cls_type is not None and cls_type in globals(): return globals()[cls_type](**data) + class BasicLayer(QObject): LEFT_VIEW=1 @@ -375,13 +377,13 @@ class GridLayer(BasicLayer): self.x_lines = [] for xi in range(self.x_size // self.cell_size[0] +1): self.x_lines.append(self.x_min + self.x_res * xi * self.cell_size[0]) - if self.x_lines[-1] == self.x_max: + if self.x_lines[-1] > self.x_max: self.x_lines.pop() self.x_lines.append(self.x_max) self.y_lines = [] for yi in range(self.y_size // self.cell_size[1]+1): self.y_lines.append(self.y_min + self.y_res * yi * self.cell_size[1]) - if self.y_lines[-1] == self.y_max: + if self.y_lines[-1] < self.y_max: self.y_lines.pop() self.y_lines.append(self.y_max) crs = QgsCoordinateReferenceSystem() @@ -408,11 +410,13 @@ class GridLayer(BasicLayer): self.set_render() - - +class Mask(object): + def __init__(self,geoxy) -> None: + super().__init__() + self.xy=geoxy class RasterLayer(BasicLayer): - def __init__(self, name=None, enable=False, path=None, view_mode=BasicLayer.BOATH_VIEW,style_info={'r':3,'g':2,'b':1,'NIR':0}): + def __init__(self, name=None, enable=False, path=None, view_mode=BasicLayer.BOATH_VIEW,style_info={'r':1,'g':2,'b':3,'NIR':0}): if name is None: name = os.path.splitext(os.path.basename(path))[0] super().__init__(name, enable, IconInstance().RASTER, path, BasicLayer.IN_FILE, view_mode) @@ -420,18 +424,68 @@ class RasterLayer(BasicLayer): self.style_info=style_info self.apply_style() def compare(self, other:'RasterLayer'): - ds1 = gdal.Open(self.path) - ds2 = gdal.Open(other.path) + ''' + 与其他图像比较,看是否处于同一投影,有无重叠区域,能否进行变化检测 + other:其它同类图层 + return:-1,无法进行比较;0,有重叠区域;1,完全重叠。 + ''' + ds1:gdal.Dataset = gdal.Open(self.path) + ds2 :gdal.Dataset = gdal.Open(other.path) + geo1=ds1.GetGeoTransform() + geo2=ds2.GetGeoTransform() + map1xy=[imageRC2geo(geo1,0,0),imageRC2geo(geo1,ds1.RasterXSize,ds1.RasterYSize)] + map2xy=[imageRC2geo(geo2,0,0),imageRC2geo(geo2,ds2.RasterXSize,ds2.RasterYSize)] + map1xx=[map1xy[0][0],map1xy[1][0]] + map1yy=[map1xy[0][1],map1xy[1][1]] + map2xx=[map2xy[0][0],map2xy[1][0]] + map2yy=[map2xy[0][1],map2xy[1][1]] + map1xx.sort() + map1yy.sort() + map2yy.sort() + map2xx.sort() if ds1 is None or ds2 is None: Project().message_box.error('图层打开失败') - return False - - if ds1.RasterXSize != ds2.RasterXSize or ds1.RasterYSize != ds2.RasterYSize: - Project().message_box.error('图层尺寸不一致') - return False - - return True - + return -1 + if not ds1.GetProjection()==ds2.GetProjection(): + Project().message_box.error('投影不一致') + return -1 + elif (map1xx[0]>map2xx[1] or map1xx[1]map2yy[1] or map1yy[1] None: + def __init__(self, pth1, pth2,style_info1,style_info2,mask=None) -> None: self.layers:List[BasicLayer] = [] self.id = str(uuid.uuid1()) @@ -708,26 +783,39 @@ class PairLayer(BasicLayer): self.grid = None self.cell_size = Project().cell_size name = os.path.basename(pth1)[:4] + '-' + os.path.basename(pth2)[:4] + self.mask=mask # self.layer_update.connect(Project().layer_updated) super().__init__(name, True, IconInstance().DOCUMENT) self.layer = self.main_l1.layer if self.check(): - self.geo = self.main_l1.geo - self.proj = self.main_l1.proj - self.size = self.main_l1.size self.layers.append(self.main_l1) self.layers.append(self.main_l2) - self.grid = GridLayer(self.proj, self.geo, self.size[0], self.size[1], cell_size=Project().cell_size) - self.grid.set_layer_parent(self) + # self.layers.append(self.grid) + @property + def l1_geo(self): + return self.main_l1.geo + @property + def l2_geo(self): + return self.main_l2.geo def check(self): if self.checked: return self.checked self.checked = self.main_l1.compare(self.main_l2) - return self.checked - + if not self.checked==-1:#重叠 + self.mask=Mask(self.main_l1.overlap(self.main_l2)) + x1,y1=geo2imageRC(self.l1_geo,*self.mask.xy[0:2]) + x2,y2=geo2imageRC(self.l1_geo,*self.mask.xy[2:]) + self.size=[x2-x1,y2-y1] + self.geo = self.main_l1.geo + self.proj = self.main_l1.proj + gridgeo=[self.mask.xy[0],self.l1_geo[1],self.l1_geo[2],self.mask.xy[1],self.l1_geo[4],self.l1_geo[5]] + self.grid = GridLayer(self.proj, gridgeo , self.size[0], self.size[1], cell_size=Project().cell_size) + self.grid.set_layer_parent(self) + return self.checked!=-1 + def add_result_layer(self, result): result.set_layer_parent(self) self.layers.insert(0, result) @@ -763,13 +851,15 @@ class PairLayer(BasicLayer): pth2=self.main_l2.path, style_info1=self.main_l1.style_info, style_info2=self.main_l2.style_info, - layers=[to_dict(l) for l in self.layers if not (l is self.grid or l is self.main_l1 or l is self.main_l2) ] + layers=[to_dict(l) for l in self.layers if not (l is self.grid or l is self.main_l1 or l is self.main_l2) ], + ) return data - + + @property def info(self): - + ds= gdal.Open(self.main_l1.path) srs= osr.SpatialReference(ds.GetProjectionRef()) metadata={} @@ -791,7 +881,9 @@ class PairLayer(BasicLayer): #公共掩模 maskData={} - + if self.mask: + maskData['左上角坐标']=self.mask.xy[0:2] + maskData['右下角坐标']=self.mask.xy[2:] mapinfo={ '坐标系':metadata, @@ -801,7 +893,7 @@ class PairLayer(BasicLayer): return mapinfo - + @staticmethod def from_dict(data): player = PairLayer(data['pth1'], data['pth2'], data['style_info1'], data['style_info2'])