123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.RegModule {
- // C++: class MapAffine
- //javadoc: MapAffine
- public class MapAffine : Map {
- protected override void Dispose(bool disposing) {
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- try {
- if (disposing) {
- }
- if (IsEnabledDispose) {
- if (nativeObj != IntPtr.Zero)
- reg_MapAffine_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose(disposing);
- }
- #else
- return;
- #endif
- }
- protected internal MapAffine(IntPtr addr)
- : base(addr) {
- }
- // internal usage only
- public static new MapAffine __fromPtr__(IntPtr addr) {
- return new MapAffine(addr);
- }
- //
- // C++: cv::reg::MapAffine::MapAffine(Mat linTr, Mat shift)
- //
- //javadoc: MapAffine::MapAffine(linTr, shift)
- public MapAffine(Mat linTr, Mat shift) :
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- base(reg_MapAffine_MapAffine_10(linTr.nativeObj, shift.nativeObj))
- #else
- base (IntPtr.Zero)
- #endif
- {
- return;
- }
- //
- // C++: cv::reg::MapAffine::MapAffine()
- //
- //javadoc: MapAffine::MapAffine()
- public MapAffine() :
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- base(reg_MapAffine_MapAffine_11())
- #else
- base (IntPtr.Zero)
- #endif
- {
- return;
- }
- //
- // C++: Ptr_Map cv::reg::MapAffine::inverseMap()
- //
- //javadoc: MapAffine::inverseMap()
- public override Map inverseMap() {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- Map retVal = Map.__fromPtr__(reg_MapAffine_inverseMap_10(nativeObj));
- return retVal;
- #else
- return null;
- #endif
- }
- //
- // C++: void cv::reg::MapAffine::compose(Ptr_Map map)
- //
- //javadoc: MapAffine::compose(map)
- public override void compose(Map map) {
- ThrowIfDisposed();
- if (map != null)
- map.ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- reg_MapAffine_compose_10(nativeObj, map.getNativeObjAddr());
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::reg::MapAffine::getLinTr(Mat& linTr)
- //
- //javadoc: MapAffine::getLinTr(linTr)
- public void getLinTr(Mat linTr) {
- ThrowIfDisposed();
- if (linTr != null)
- linTr.ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- reg_MapAffine_getLinTr_10(nativeObj, linTr.nativeObj);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::reg::MapAffine::getShift(Mat& shift)
- //
- //javadoc: MapAffine::getShift(shift)
- public void getShift(Mat shift) {
- ThrowIfDisposed();
- if (shift != null)
- shift.ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- reg_MapAffine_getShift_10(nativeObj, shift.nativeObj);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::reg::MapAffine::inverseWarp(Mat img1, Mat& img2)
- //
- //javadoc: MapAffine::inverseWarp(img1, img2)
- public override void inverseWarp(Mat img1, Mat img2) {
- ThrowIfDisposed();
- if (img1 != null)
- img1.ThrowIfDisposed();
- if (img2 != null)
- img2.ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- reg_MapAffine_inverseWarp_10(nativeObj, img1.nativeObj, img2.nativeObj);
- return;
- #else
- return;
- #endif
- }
- //
- // C++: void cv::reg::MapAffine::scale(double factor)
- //
- //javadoc: MapAffine::scale(factor)
- public override void scale(double factor) {
- ThrowIfDisposed();
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- reg_MapAffine_scale_10(nativeObj, factor);
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_ANDROID && !UNITY_EDITOR)
- const string LIBNAME = "opencvforunity";
- // C++: cv::reg::MapAffine::MapAffine(Mat linTr, Mat shift)
- [DllImport(LIBNAME)]
- private static extern IntPtr reg_MapAffine_MapAffine_10(IntPtr linTr_nativeObj, IntPtr shift_nativeObj);
- // C++: cv::reg::MapAffine::MapAffine()
- [DllImport(LIBNAME)]
- private static extern IntPtr reg_MapAffine_MapAffine_11();
- // C++: Ptr_Map cv::reg::MapAffine::inverseMap()
- [DllImport(LIBNAME)]
- private static extern IntPtr reg_MapAffine_inverseMap_10(IntPtr nativeObj);
- // C++: void cv::reg::MapAffine::compose(Ptr_Map map)
- [DllImport(LIBNAME)]
- private static extern void reg_MapAffine_compose_10(IntPtr nativeObj, IntPtr map_nativeObj);
- // C++: void cv::reg::MapAffine::getLinTr(Mat& linTr)
- [DllImport(LIBNAME)]
- private static extern void reg_MapAffine_getLinTr_10(IntPtr nativeObj, IntPtr linTr_nativeObj);
- // C++: void cv::reg::MapAffine::getShift(Mat& shift)
- [DllImport(LIBNAME)]
- private static extern void reg_MapAffine_getShift_10(IntPtr nativeObj, IntPtr shift_nativeObj);
- // C++: void cv::reg::MapAffine::inverseWarp(Mat img1, Mat& img2)
- [DllImport(LIBNAME)]
- private static extern void reg_MapAffine_inverseWarp_10(IntPtr nativeObj, IntPtr img1_nativeObj, IntPtr img2_nativeObj);
- // C++: void cv::reg::MapAffine::scale(double factor)
- [DllImport(LIBNAME)]
- private static extern void reg_MapAffine_scale_10(IntPtr nativeObj, double factor);
- // native support for java finalize()
- [DllImport(LIBNAME)]
- private static extern void reg_MapAffine_delete(IntPtr nativeObj);
- #endif
- }
- }
|