Changeset 32582
- Timestamp:
- 04/18/09 18:37:46 (4 years ago)
- Location:
- lang/cpluspluscli/OpenCvSharp2/trunk
- Files:
-
- 15 modified
-
OpenCvSharp.Blob/OpenCvSharp.Blob.vcproj (modified) (7 diffs)
-
OpenCvSharp.Blob/Stdafx.h (modified) (1 diff)
-
OpenCvSharp.Extern/CvInline.h (modified) (1 diff)
-
OpenCvSharp.Extern/OpenCvSharp.Extern.vcproj (modified) (4 diffs)
-
OpenCvSharp.Extern/WCvSubdiv2DPoint.h (modified) (2 diffs)
-
OpenCvSharp.MachineLearning/OpenCvSharp.MachineLearning.vcproj (modified) (4 diffs)
-
OpenCvSharp.Test/Program.cs (modified) (1 diff)
-
OpenCvSharp.Test/Samples/Delaunay.cs (modified) (1 diff)
-
OpenCvSharp/Src/Class/CvQuadEdge2D.cs (modified) (7 diffs)
-
OpenCvSharp/Src/Class/CvSubdiv2DPoint.cs (modified) (8 diffs)
-
OpenCvSharp/Src/Core/Cv_A-C.cs (modified) (6 diffs)
-
OpenCvSharp/Src/Core/Cv_D-G.cs (modified) (2 diffs)
-
OpenCvSharp/Src/Core/Cv_R-Z.cs (modified) (12 diffs)
-
OpenCvSharp/Src/CvArr/CvSubdiv2D.cs (modified) (7 diffs)
-
OpenCvSharp/Src/Struct/CvSubdiv2DEdge.cs (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Blob/OpenCvSharp.Blob.vcproj
r32561 r32582 62 62 <Tool 63 63 Name="VCLinkerTool" 64 AdditionalDependencies="cv.lib cxcore.lib cxts.lib highgui.lib ml.lib$(NOINHERIT)"64 AdditionalDependencies="cv.lib cxcore.lib cxts.lib $(NOINHERIT)" 65 65 LinkIncremental="2" 66 66 AdditionalLibraryDirectories=""D:\logiciels\OpenCV\lib"" … … 137 137 <Tool 138 138 Name="VCLinkerTool" 139 AdditionalDependencies="cv.lib cxcore.lib cxts.lib highgui.lib ml.lib$(NOINHERIT)"139 AdditionalDependencies="cv.lib cxcore.lib cxts.lib $(NOINHERIT)" 140 140 LinkIncremental="1" 141 141 AdditionalLibraryDirectories=""C:\Program Files\OpenCV\lib"" … … 211 211 <Tool 212 212 Name="VCLinkerTool" 213 AdditionalDependencies="cv.lib cxcore.lib cxts.lib highgui.lib ml.lib$(NOINHERIT)"213 AdditionalDependencies="cv.lib cxcore.lib cxts.lib $(NOINHERIT)" 214 214 LinkIncremental="2" 215 215 AdditionalLibraryDirectories=""D:\logiciels\OpenCV\lib"" … … 286 286 <Tool 287 287 Name="VCLinkerTool" 288 AdditionalDependencies="cv.lib cxcore.lib cxts.lib highgui.lib ml.lib$(NOINHERIT)"288 AdditionalDependencies="cv.lib cxcore.lib cxts.lib $(NOINHERIT)" 289 289 LinkIncremental="1" 290 290 AdditionalLibraryDirectories=""C:\Program Files\OpenCV\lib"" … … 344 344 <Files> 345 345 <Filter 346 Name=" �\�[�X �t�@�C��"346 Name="Source Files" 347 347 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" 348 348 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" … … 414 414 </Filter> 415 415 <Filter 416 Name=" �w�b�_�[ �t�@�C��"416 Name="Header Files" 417 417 Filter="h;hpp;hxx;hm;inl;inc;xsd" 418 418 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" … … 452 452 </Filter> 453 453 <Filter 454 Name=" ���\�[�X �t�@�C��"454 Name="Resource Files" 455 455 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" 456 456 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Blob/Stdafx.h
r31883 r32582 6 6 7 7 #include <cv.h> 8 #include <highgui.h>9 8 #include <msclr/marshal.h> 10 9 -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/CvInline.h
r32539 r32582 314 314 } 315 315 316 // Subdiv 317 static IntPtr cvCreateSubdivDelaunay2D( System::Drawing::Rectangle rect, IntPtr storage ) 318 { 319 ::CvMemStorage* storagePtr = reinterpret_cast<::CvMemStorage*>(storage.ToPointer()); 320 return IntPtr( ::cvCreateSubdivDelaunay2D(cvRect(rect.X, rect.Y, rect.Width, rect.Height), storagePtr) ); 321 } 316 322 }; 317 323 } -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/OpenCvSharp.Extern.vcproj
r32564 r32582 2 2 <VisualStudioProject 3 3 ProjectType="Visual C++" 4 Version="9 ,00"4 Version="9.00" 5 5 Name="OpenCvSharp.Extern" 6 6 ProjectGUID="{38E4FA6B-0F95-4020-98C4-D8828A20699F}" … … 411 411 <Files> 412 412 <Filter 413 Name=" �\�[�X �t�@�C��"413 Name="Source Files" 414 414 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" 415 415 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" … … 613 613 </Filter> 614 614 <Filter 615 Name=" �w�b�_�[ �t�@�C��"615 Name="Header Files" 616 616 Filter="h;hpp;hxx;hm;inl;inc;xsd" 617 617 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" … … 775 775 </Filter> 776 776 <Filter 777 Name=" ���\�[�X �t�@�C��"777 Name="Resource Files" 778 778 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" 779 779 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/WCvSubdiv2DPoint.h
r31568 r32582 11 11 namespace Extern 12 12 { 13 /// <summary>14 /// オリジナルの細分割と双対細分割の点を表すクラス13 /// <summary> 14 /// Point of original or dual subdivision 15 15 /// </summary> 16 16 public ref class WCvSubdiv2DPoint … … 21 21 public: 22 22 /// <summary> 23 /// 元データであるCvSubdiv2DPoint*を取得する23 /// CvSubdiv2DPoint* 24 24 /// </summary> 25 25 initonly IntPtr Ptr; 26 26 /// <summary> 27 /// sizeof(CvSubdiv2DPoint) を取得する27 /// sizeof(CvSubdiv2DPoint) 28 28 /// </summary> 29 29 literal Int32 SizeOf = static_cast<Int32>(sizeof(CvSubdiv2DPoint)); 30 30 31 31 /// <summary> 32 /// 初期化32 /// Constructor 33 33 /// </summary> 34 34 WCvSubdiv2DPoint(IntPtr ptr) -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.MachineLearning/OpenCvSharp.MachineLearning.vcproj
r32555 r32582 2 2 <VisualStudioProject 3 3 ProjectType="Visual C++" 4 Version="9 ,00"4 Version="9.00" 5 5 Name="OpenCvSharp.MachineLearning" 6 6 ProjectGUID="{A40523C9-C39B-4628-92C8-84E904FF3626}" … … 261 261 <Files> 262 262 <Filter 263 Name=" �\�[�X �t�@�C��"263 Name="Source Files" 264 264 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" 265 265 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" … … 339 339 </Filter> 340 340 <Filter 341 Name=" �w�b�_�[ �t�@�C��"341 Name="Header Files" 342 342 Filter="h;hpp;hxx;hm;inl;inc;xsd" 343 343 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" … … 417 417 </Filter> 418 418 <Filter 419 Name=" ���\�[�X �t�@�C��"419 Name="Resource Files" 420 420 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" 421 421 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Test/Program.cs
r32568 r32582 82 82 //new Test.CornerDetect(); // コーナーの検出 83 83 84 //new Test.Delaunay(); // ドロネー84 new Test.Delaunay(); // ドロネー 85 85 86 86 //new Test.DFT(); // 離散フーリエ変換 -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Test/Samples/Delaunay.cs
r32568 r32582 26 26 { 27 27 img.Set(bkgnd_color); 28 CvSubdiv2D subdiv = new CvSubdiv2D( storage, rect);28 CvSubdiv2D subdiv = new CvSubdiv2D(rect, storage); 29 29 for (int i = 0; i < 200; i++) 30 30 { -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Class/CvQuadEdge2D.cs
r32510 r32582 7 7 namespace KwsmLab.OpenCvSharp 8 8 { 9 #if LANG_JP 9 10 /// <summary> 10 11 /// 平面細分割のQuad-edge構造体 11 12 /// </summary> 13 #else 14 /// <summary> 15 /// Quad-edge of planar subdivision 16 /// </summary> 17 #endif 12 18 public class CvQuadEdge2D : ICvPtrHolder 13 19 { 14 20 /// <summary> 15 /// C++/CLI 側でポインタにアクセスするオブジェクト21 /// C++/CLI wrapper of native structure's poitner 16 22 /// </summary> 17 23 private Extern.WCvQuadEdge2D data; 18 24 /// <summary> 19 /// データポインタ25 /// native structure's pointer 20 26 /// </summary> 21 27 private IntPtr ptr; 22 28 23 29 24 #region 初期化・キャスト演算子 30 #region Initialization & Operators 31 #if LANG_JP 25 32 /// <summary> 26 33 /// ポインタから初期化 27 34 /// </summary> 28 35 /// <param name="ptr">CvQuadEdge2D*</param> 36 #else 37 /// <summary> 38 /// Initializes from native pointer 39 /// </summary> 40 /// <param name="ptr"></param> 41 #endif 29 42 public CvQuadEdge2D(IntPtr ptr) 30 43 { … … 32 45 this.data = new Extern.WCvQuadEdge2D(ptr); 33 46 } 47 #if LANG_JP 34 48 /// <summary> 35 /// ポインタからオブジェクトを生成 して返す49 /// ポインタからオブジェクトを生成する 36 50 /// </summary> 37 51 /// <param name="ptr"></param> 38 52 /// <returns></returns> 53 #else 54 /// <summary> 55 /// Creates an instance from native pointer 56 /// </summary> 57 /// <param name="ptr"></param> 58 /// <returns></returns> 59 #endif 39 60 public static CvQuadEdge2D FromPtr(IntPtr ptr) 40 61 { … … 45 66 return new CvQuadEdge2D(ptr); 46 67 } 68 #if LANG_JP 47 69 /// <summary> 48 70 /// ポインタからの明示的なキャスト … … 50 72 /// <param name="ptr"></param> 51 73 /// <returns></returns> 74 #else 75 /// <summary> 76 /// explicit cast from IntPtr to CvQuadEdge2D 77 /// </summary> 78 /// <param name="ptr"></param> 79 /// <returns></returns> 80 #endif 52 81 public static explicit operator CvQuadEdge2D(IntPtr ptr) 53 82 { … … 58 87 return new CvQuadEdge2D(ptr); 59 88 } 89 #if LANG_JP 60 90 /// <summary> 61 /// CvSeqReaderから オブジェクトを読み込んで返す91 /// CvSeqReaderからCvQuadEdge2Dのインスタンスを読み込んで返す 62 92 /// </summary> 63 93 /// <param name="reader"></param> 64 94 /// <returns></returns> 65 public static CvQuadEdge2D FromSeqReader(CvSeqReader reader) 95 #else 96 /// <summary> 97 /// Reads a CvQuadEdge2D instance from CvSeqReader 98 /// </summary> 99 /// <param name="reader"></param> 100 /// <returns></returns> 101 #endif 102 public static CvQuadEdge2D FromSeqReader(CvSeqReader reader) 66 103 { 67 104 if (reader == null) … … 72 109 } 73 110 111 #if LANG_JP 74 112 /// <summary> 75 113 /// CvSubdiv2DEdgeへの明示的キャスト 76 114 /// </summary> 77 115 /// <param name="self"></param> 78 public static explicit operator CvSubdiv2DEdge( CvQuadEdge2D self ) 116 #else 117 /// <summary> 118 /// explicit cast to CvSubdiv2DEdge 119 /// </summary> 120 /// <param name="self"></param> 121 /// <returns></returns> 122 #endif 123 public static explicit operator CvSubdiv2DEdge(CvQuadEdge2D self) 79 124 { 80 125 return self.ToCvSubdiv2DEdge(); 81 126 } 82 /// <summary> 83 /// CvSubdiv2DEdgeへ変換して返す 84 /// </summary> 85 public CvSubdiv2DEdge ToCvSubdiv2DEdge() 86 { 87 return new CvSubdiv2DEdge((uint)this.CvPtr.ToInt32()); 127 #if LANG_JP 128 /// <summary> 129 /// CvSubdiv2DEdgeへ変換して返す 130 /// </summary> 131 #else 132 /// <summary> 133 /// Converts to a CvSubdiv2DEdge instance 134 /// </summary> 135 /// <returns></returns> 136 #endif 137 public CvSubdiv2DEdge ToCvSubdiv2DEdge() 138 { 139 return new CvSubdiv2DEdge((uint)this.CvPtr.ToInt32()); 88 140 //uint value = (uint)Marshal.ReadInt32(this.CvPtr); 89 141 //return new CvSubdiv2DEdge(value); 90 }142 } 91 143 #endregion 92 144 … … 94 146 #region プロパティ 95 147 /// <summary> 96 /// sizeof(CvQuadEdge2D) を取得する148 /// sizeof(CvQuadEdge2D) 97 149 /// </summary> 98 150 public const Int32 SizeOf = Extern.WCvQuadEdge2D.SizeOf; 99 151 /// <summary> 100 /// データポインタ(CvQuadEdge2D*)を取得する152 /// Data pointer (CvQuadEdge2D*) 101 153 /// </summary> 102 154 public IntPtr CvPtr -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Class/CvSubdiv2DPoint.cs
r32510 r32582 1 using System; 1 /* 2 * (C) 2008-2009 Schima 3 * This code is licenced under the LGPL. 4 */ 5 6 using System; 2 7 using System.Collections.Generic; 3 8 using System.Linq; … … 7 12 namespace KwsmLab.OpenCvSharp 8 13 { 14 #if LANG_JP 9 15 /// <summary> 10 16 /// オリジナルの細分割と双対細分割の点を表すクラス 11 17 /// </summary> 18 #else 19 /// <summary> 20 /// Point of original or dual subdivision 21 /// </summary> 22 #endif 12 23 public class CvSubdiv2DPoint : DisposableObject, ICvPtrHolder 13 24 { 14 25 /// <summary> 15 /// C++/CLI 側でポインタにアクセスするオブジェクト26 /// C++/CLI wrapper of native structure's pointer 16 27 /// </summary> 17 28 private Extern.WCvSubdiv2DPoint data; 18 29 /// <summary> 19 /// データポインタ30 /// data pointer 20 31 /// </summary> 21 32 private IntPtr ptr; 22 33 23 34 35 #if LANG_JP 24 36 /// <summary> 25 37 /// ポインタから初期化 26 38 /// </summary> 27 39 /// <param name="ptr"></param> 40 #else 41 /// <summary> 42 /// Initializes from native pointer 43 /// </summary> 44 /// <param name="ptr"></param> 45 #endif 28 46 public CvSubdiv2DPoint(IntPtr ptr) 29 47 { … … 32 50 base.NotifyMemoryPressure(SizeOf); 33 51 } 52 #if LANG_JP 34 53 /// <summary> 35 54 /// ポインタからオブジェクトを生成して返す … … 37 56 /// <param name="ptr"></param> 38 57 /// <returns></returns> 58 #else 59 /// <summary> 60 /// Creates a CvSubdiv2DPoint instance from native pointer 61 /// </summary> 62 /// <param name="ptr"></param> 63 /// <returns></returns> 64 #endif 39 65 public static CvSubdiv2DPoint FromPtr(IntPtr ptr) 40 66 { … … 45 71 return new CvSubdiv2DPoint(ptr); 46 72 } 73 #if LANG_JP 47 74 /// <summary> 48 75 /// ポインタからの明示的なキャスト … … 50 77 /// <param name="ptr"></param> 51 78 /// <returns></returns> 79 #else 80 /// <summary> 81 /// Explicit cast from IntPtr to CvSubdiv2DPoint 82 /// </summary> 83 /// <param name="ptr"></param> 84 /// <returns></returns> 85 #endif 52 86 public static explicit operator CvSubdiv2DPoint(IntPtr ptr) 53 87 { … … 62 96 #region プロパティ 63 97 /// <summary> 64 /// sizeof(CvSubdiv2D) を取得する98 /// sizeof(CvSubdiv2D) 65 99 /// </summary> 66 100 public const int SizeOf = Extern.WCvSubdiv2DPoint.SizeOf; 67 101 /// <summary> 68 /// データポインタ(CvSubdiv2D*)を取得する102 /// Data pointer (CvSubdiv2D*) 69 103 /// </summary> 70 104 public IntPtr CvPtr … … 73 107 } 74 108 109 #if LANG_JP 75 110 /// <summary> 76 111 /// 様々なフラグ 77 112 /// </summary> 113 #else 114 /// <summary> 115 /// Various flags 116 /// </summary> 117 #endif 78 118 public int Flags 79 119 { 80 120 get { return data.flags; } 81 121 } 122 #if LANG_JP 82 123 /// <summary> 83 124 /// 84 125 /// </summary> 126 #else 127 /// <summary> 128 /// 129 /// </summary> 130 #endif 85 131 public uint First 86 132 { 87 133 get { return data.first; } 88 134 } 135 #if LANG_JP 89 136 /// <summary> 90 137 /// 91 138 /// </summary> 139 #else 140 /// <summary> 141 /// 142 /// </summary> 143 #endif 92 144 public CvPoint2D32f Pt 93 145 { -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_A-C.cs
r32565 r32582 1846 1846 #endregion 1847 1847 #region CalcSubdivVoronoi2D 1848 #if LANG_JP 1848 1849 /// <summary> 1849 1850 /// 仮想点の座標を計算する.元の細分割面のある頂点に対応する仮想点全てを接続すると,その頂点を含むボロノイ領域の境界を構成する. 1850 1851 /// </summary> 1851 1852 /// <param name="subdiv">ドロネー細分割.全ての点は追加済みである</param> 1853 #else 1854 /// <summary> 1855 /// Calculates coordinates of Voronoi diagram cells. 1856 /// </summary> 1857 /// <param name="subdiv">Delaunay subdivision, where all the points are added already. </param> 1858 #endif 1852 1859 public static void CalcSubdivVoronoi2D(CvSubdiv2D subdiv) 1853 1860 { … … 2501 2508 #endregion 2502 2509 #region ClearSubdivVoronoi2D 2510 #if LANG_JP 2503 2511 /// <summary> 2504 2512 /// 全ての仮想点を削除する. … … 2506 2514 /// </summary> 2507 2515 /// <param name="subdiv">ドロネー細分割</param> 2516 #else 2517 /// <summary> 2518 /// Removes all virtual points 2519 /// </summary> 2520 /// <param name="subdiv">Delaunay subdivision. </param> 2521 #endif 2508 2522 public static void ClearSubdivVoronoi2D(CvSubdiv2D subdiv) 2509 2523 { … … 4344 4358 #endregion 4345 4359 #region CreateSubdiv2D 4360 #if LANG_JP 4346 4361 /// <summary> 4347 4362 /// CvSubdiv2Dを生成する。 … … 4354 4369 /// <param name="storage"></param> 4355 4370 /// <returns></returns> 4371 #else 4372 /// <summary> 4373 /// Creates empty Delaunay triangulation. 4374 /// The users must initialize the returned value by cvInitSubdivDelaunay2D. 4375 /// </summary> 4376 /// <param name="subdiv_type"></param> 4377 /// <param name="header_size"></param> 4378 /// <param name="vtx_size"></param> 4379 /// <param name="quadedge_size"></param> 4380 /// <param name="storage"></param> 4381 /// <returns></returns> 4382 #endif 4356 4383 public static CvSubdiv2D CreateSubdiv2D(SeqType subdiv_type, Int32 header_size, Int32 vtx_size, Int32 quadedge_size, CvMemStorage storage) 4357 4384 { … … 4360 4387 throw new ArgumentNullException("storage"); 4361 4388 } 4362 IntPtr ptr= CvDll.cvCreateSubdiv2D(subdiv_type, header_size, vtx_size, quadedge_size, storage.CvPtr);4363 if ( ptr== IntPtr.Zero)4389 IntPtr result = CvDll.cvCreateSubdiv2D(subdiv_type, header_size, vtx_size, quadedge_size, storage.CvPtr); 4390 if (result == IntPtr.Zero) 4364 4391 return null; 4365 4392 else 4366 return new CvSubdiv2D(ptr); 4393 return new CvSubdiv2D(result); 4394 } 4395 #endregion 4396 #region CreateSubdivDelaunay2D 4397 #if LANG_JP 4398 /// <summary> 4399 /// 空のドロネー三角形を作成する 4400 /// </summary> 4401 /// <param name="rect">細分割のために追加される全ての2次元点を包含する矩形.</param> 4402 /// <param name="storage">細分割のための領域.</param> 4403 /// <returns></returns> 4404 #else 4405 /// <summary> 4406 /// Creates empty Delaunay triangulation 4407 /// </summary> 4408 /// <param name="rect">Rectangle that includes all the 2d points that are to be added to subdivision. </param> 4409 /// <param name="storage">Container for subdivision. </param> 4410 /// <returns></returns> 4411 #endif 4412 public static CvSubdiv2D CreateSubdivDelaunay2D(CvRect rect, CvMemStorage storage) 4413 { 4414 if (storage == null) 4415 { 4416 throw new ArgumentNullException("storage"); 4417 } 4418 IntPtr result = CvInline.cvCreateSubdivDelaunay2D(rect, storage.CvPtr); 4419 if (result == IntPtr.Zero) 4420 return null; 4421 else 4422 return new CvSubdiv2D(result); 4367 4423 } 4368 4424 #endregion -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_D-G.cs
r32533 r32582 1381 1381 #endregion 1382 1382 #region FindNearestPoint2D 1383 #if LANG_JP 1383 1384 /// <summary> 1384 1385 /// 与えられた点に最も近い細分割の頂点を求める. 入力点を細分割内に配置するもう一つの関数である. … … 1388 1389 /// <param name="pt">入力点</param> 1389 1390 /// <returns></returns> 1390 public static CvSubdiv2DPoint FindNearestPoint2D(CvSubdiv2D subdiv, CvPoint2D32f pt) 1391 #else 1392 /// <summary> 1393 /// Finds the closest subdivision vertex to given point 1394 /// </summary> 1395 /// <param name="subdiv">Delaunay or another subdivision. </param> 1396 /// <param name="pt">Input point. </param> 1397 /// <returns></returns> 1398 #endif 1399 public static CvSubdiv2DPoint FindNearestPoint2D(this CvSubdiv2D subdiv, CvPoint2D32f pt) 1391 1400 { 1392 1401 if (subdiv == null) -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_R-Z.cs
r32510 r32582 3083 3083 #endregion 3084 3084 #region Subdiv2DEdgeDst 3085 #if LANG_JP 3085 3086 /// <summary> 3086 3087 /// 辺の終点を返す. 3087 /// 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す. 3088 /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される 3088 /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される. 3089 3089 /// </summary> 3090 3090 /// <param name="edge">細分割平面の辺の一つ(quad-edge表現ではない)</param> 3091 /// <returns>辺の終点</returns> 3091 /// <returns>辺の終点. 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す.</returns> 3092 #else 3093 /// <summary> 3094 /// Returns edge destination. 3095 /// </summary> 3096 /// <param name="edge">Subdivision edge (not a quad-edge) </param> 3097 /// <returns>The edge destination. If the edge is from dual subdivision and the virtual point coordinates are not calculated yet, the returned pointer may be null.</returns> 3098 #endif 3092 3099 public static CvSubdiv2DPoint Subdiv2DEdgeDst(CvSubdiv2DEdge edge) 3093 3100 { … … 3100 3107 #endregion 3101 3108 #region Subdiv2DEdgeOrg 3109 #if LANG_JP 3102 3110 /// <summary> 3103 3111 /// 辺の始点を返す. 3104 /// 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す. 3105 /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される 3112 /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される. 3106 3113 /// </summary> 3107 3114 /// <param name="edge">細分割平面の辺の一つ(quad-edge表現ではない)</param> 3108 /// <returns>辺の始点</returns> 3115 /// <returns>辺の始点. 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す.</returns> 3116 #else 3117 /// <summary> 3118 /// Returns edge origin. 3119 /// </summary> 3120 /// <param name="edge">Subdivision edge (not a quad-edge) </param> 3121 /// <returns>The edge origin. If the edge is from dual subdivision and the virtual point coordinates are not calculated yet, the returned pointer may be null.</returns> 3122 #endif 3109 3123 public static CvSubdiv2DPoint Subdiv2DEdgeOrg(CvSubdiv2DEdge edge) 3110 3124 { … … 3117 3131 #endregion 3118 3132 #region Subdiv2DGetEdge 3133 #if LANG_JP 3119 3134 /// <summary> 3120 3135 /// 入力された辺に関連する辺の一つを返す … … 3123 3138 /// <param name="type">戻り値とする辺の条件</param> 3124 3139 /// <returns>与えられた辺に関連する辺の一つ</returns> 3140 #else 3141 /// <summary> 3142 /// Returns one of edges related to given. 3143 /// </summary> 3144 /// <param name="edge">Subdivision edge (not a quad-edge) </param> 3145 /// <param name="type">Specifies, which of related edges to return</param> 3146 /// <returns>one the edges related to the input edge</returns> 3147 #endif 3125 3148 public static CvSubdiv2DEdge Subdiv2DGetEdge(CvSubdiv2DEdge edge, CvNextEdgeType type) 3126 3149 { … … 3129 3152 #endregion 3130 3153 #region Subdiv2DLocate 3154 #if LANG_JP 3131 3155 /// <summary> 3132 3156 /// ドロネー三角形に点を追加する … … 3136 3160 /// <param name="edge">出力される辺.配置した点は,その辺上または端に存在する.</param> 3137 3161 /// <returns>配置する点</returns> 3162 #else 3163 /// <summary> 3164 /// Inserts a single point to Delaunay triangulation 3165 /// </summary> 3166 /// <param name="subdiv">Delaunay or another subdivision. </param> 3167 /// <param name="pt">The point to locate. </param> 3168 /// <param name="edge">The output edge the point falls onto or right to. </param> 3169 /// <returns></returns> 3170 #endif 3138 3171 public static CvSubdiv2DPointLocation Subdiv2DLocate(CvSubdiv2D subdiv, CvPoint2D32f pt, out CvSubdiv2DEdge edge) 3139 3172 { … … 3148 3181 return result; 3149 3182 } 3183 #if LANG_JP 3150 3184 /// <summary> 3151 3185 /// ドロネー三角形に点を追加する … … 3156 3190 /// <param name="vertex">オプション出力.入力点と一致する細分割の頂点へのポインタのポインタ</param> 3157 3191 /// <returns>配置する点</returns> 3192 #else 3193 /// <summary> 3194 /// Inserts a single point to Delaunay triangulation 3195 /// </summary> 3196 /// <param name="subdiv">Delaunay or another subdivision. </param> 3197 /// <param name="pt">The point to locate. </param> 3198 /// <param name="edge">The output edge the point falls onto or right to. </param> 3199 /// <param name="vertex">Optional output vertex double pointer the input point coinsides with. </param> 3200 /// <returns></returns> 3201 #endif 3158 3202 public static CvSubdiv2DPointLocation Subdiv2DLocate(CvSubdiv2D subdiv, CvPoint2D32f pt, out CvSubdiv2DEdge edge, ref CvSubdiv2DPoint vertex) 3159 3203 { … … 3178 3222 #endregion 3179 3223 #region Subdiv2DRotateEdge 3224 #if LANG_JP 3180 3225 /// <summary> 3181 3226 /// 入力された辺を含むquad-edge中の辺の一つを返す. … … 3184 3229 /// <param name="rotate">関係の指定(入力された辺と同じquad-edgeのどの辺を返すかを指定)</param> 3185 3230 /// <returns></returns> 3231 #else 3232 /// <summary> 3233 /// Returns another edge of the same quad-edge 3234 /// </summary> 3235 /// <param name="edge">Subdivision edge (not a quad-edge) </param> 3236 /// <param name="rotate">Specifies, which of edges of the same quad-edge as the input one to return</param> 3237 /// <returns>one the edges of the same quad-edge as the input edge. </returns> 3238 #endif 3186 3239 public static CvSubdiv2DEdge Subdiv2DRotateEdge(CvSubdiv2DEdge edge, RotateEdgeFlag rotate) 3187 3240 { … … 3190 3243 #endregion 3191 3244 #region SubdivDelaunay2DInsert 3245 #if LANG_JP 3192 3246 /// <summary> 3193 3247 /// ドロネー三角形に点を追加する … … 3196 3250 /// <param name="pt">追加する点</param> 3197 3251 /// <returns></returns> 3252 #else 3253 /// <summary> 3254 /// Inserts a single point to Delaunay triangulation 3255 /// </summary> 3256 /// <param name="subdiv">Delaunay subdivision created by function cvCreateSubdivDelaunay2D. </param> 3257 /// <param name="pt">Inserted point. </param> 3258 /// <returns></returns> 3259 #endif 3198 3260 public static CvSubdiv2DPoint SubdivDelaunay2DInsert(CvSubdiv2D subdiv, CvPoint2D32f pt) 3199 3261 { -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/CvArr/CvSubdiv2D.cs
r32510 r32582 3 3 using System.Linq; 4 4 using System.Text; 5 using KwsmLab.OpenCvSharp.Extern; 5 6 6 7 namespace KwsmLab.OpenCvSharp … … 27 28 28 29 29 #if LANG_JP 30 /// <summary> 31 /// cvCreateSubdiv2DとcvInitSubdivDelaunay2で初期化 30 #region Constructors & Destructors 31 #if LANG_JP 32 /// <summary> 33 /// cvCreateSubdivDelaunay2Dで初期化 32 34 /// </summary> 35 /// <param name="rect"></param> 33 36 /// <param name="storage"></param> 34 /// <param name="rect"></param> 35 #else 36 /// <summary>37 /// Initializes by cvCreateSubdiv2D and cvInitSubdivDelaunay238 /// < /summary>37 #else 38 /// <summary> 39 /// Initializes using cvCreateSubdivDelaunay2D 40 /// </summary> 41 /// <param name="rect"></param> 39 42 /// <param name="storage"></param> 40 /// <param name="rect"></param> 41 #endif 42 public CvSubdiv2D(CvMemStorage storage, CvRect rect) 43 #endif 44 public CvSubdiv2D(CvRect rect, CvMemStorage storage) 43 45 : this( 44 CvDll.cvCreateSubdiv2D(SeqType.KindSubdiv2D, CvSubdiv2D.SizeOf, CvSubdiv2DPoint.SizeOf, CvQuadEdge2D.SizeOf, 45 (storage == null) ? IntPtr.Zero : storage.CvPtr) 46 CvInline.cvCreateSubdivDelaunay2D(rect, (storage == null) ? IntPtr.Zero : storage.CvPtr) 46 47 ) 47 48 { 48 CvDll.cvInitSubdivDelaunay2D(this.ptr, rect);49 49 } 50 50 #if LANG_JP … … 83 83 base.Dispose(); 84 84 } 85 86 #region プロパティ 85 #endregion 86 87 88 #region Properties 87 89 /// <summary> 88 90 /// sizeof(CvSubdiv2D) … … 166 168 167 169 168 #region OpenCV メソッド170 #region OpenCV Methods 169 171 #region CalcVoronoi2D 170 /// <summary> 171 /// 仮想点の座標を計算する.元の細分割面のある頂点に対応する仮想点全てを接続すると,その頂点を含むボロノイ領域の境界を構成する(CalcSubdivVoronoi2D相当) 172 /// </summary> 172 #if LANG_JP 173 /// <summary> 174 /// 仮想点の座標を計算する.元の細分割面のある頂点に対応する仮想点全てを接続すると,その頂点を含むボロノイ領域の境界を構成する (CalcSubdivVoronoi2D) . 175 /// </summary> 176 #else 177 /// <summary> 178 /// Calculates coordinates of Voronoi diagram cells (CalcSubdivVoronoi2D). 179 /// </summary> 180 #endif 173 181 public void CalcVoronoi2D() 174 182 { … … 177 185 #endregion 178 186 #region ClearVoronoi2D 179 /// <summary> 180 /// 全ての仮想点を削除する. 187 #if LANG_JP 188 /// <summary> 189 /// 全ての仮想点を削除する (cvClearSubdivVoronoi2D). 181 190 /// この関数の前回の呼出し後に細分割が変更された場合,この関数は cvCalcSubdivVoronoi2D の内部で呼ばれる. 182 191 /// </summary> 183 /// <param name="subdiv">ドロネー細分割</param> 184 public void ClearVoronoi2D(CvSubdiv2D subdiv) 185 { 186 CvDll.cvClearSubdivVoronoi2D(CvPtr); 192 #else 193 /// <summary> 194 /// Removes all virtual points (cvClearSubdivVoronoi2D). 195 /// </summary> 196 #endif 197 public void ClearVoronoi2D() 198 { 199 CvDll.cvClearSubdivVoronoi2D(ptr); 187 200 } 188 201 #endregion 189 202 #region Insert 190 /// <summary> 191 /// ドロネー三角形に点を追加する (SubdivDelaunay2D相当) 203 #if LANG_JP 204 /// <summary> 205 /// ドロネー三角形に点を追加する (cvSubdivDelaunay2D). 192 206 /// </summary> 193 207 /// <param name="pt">追加する点</param> 194 208 /// <returns></returns> 209 #else 210 /// <summary> 211 /// Inserts a single point to Delaunay triangulation (cvSubdivDelaunay2D). 212 /// </summary> 213 /// <param name="pt">Inserted point. </param> 214 /// <returns></returns> 215 #endif 195 216 public CvSubdiv2DPoint Insert(CvPoint2D32f pt) 196 217 { … … 199 220 #endregion 200 221 #region Locate 201 /// <summary> 202 /// ドロネー三角形に点を追加する (Subdiv2DLocate相当) 222 #if LANG_JP 223 /// <summary> 224 /// ドロネー三角形に点を追加する (cvSubdiv2DLocate). 203 225 /// </summary> 204 226 /// <param name="pt">配置する点</param> 205 227 /// <param name="edge">出力される辺.配置した点は,その辺上または端に存在する.</param> 206 228 /// <returns>配置する点</returns> 229 #else 230 /// <summary> 231 /// Inserts a single point to Delaunay triangulation (cvSubdiv2DLocate). 232 /// </summary> 233 /// <param name="pt">The point to locate. </param> 234 /// <param name="edge">The output edge the point falls onto or right to. </param> 235 /// <returns></returns> 236 #endif 207 237 public CvSubdiv2DPointLocation Locate(CvPoint2D32f pt, out CvSubdiv2DEdge edge) 208 238 { 209 239 return Cv.Subdiv2DLocate(this, pt, out edge); 210 240 } 211 /// <summary> 212 /// ドロネー三角形に点を追加する (Subdiv2DLocate相当) 241 #if LANG_JP 242 /// <summary> 243 /// ドロネー三角形に点を追加する (cvSubdiv2DLocate). 213 244 /// </summary> 214 245 /// <param name="pt">配置する点</param> … … 216 247 /// <param name="vertex">オプション出力.入力点と一致する細分割の頂点へのポインタのポインタ</param> 217 248 /// <returns>配置する点</returns> 249 #else 250 /// <summary> 251 /// Inserts a single point to Delaunay triangulation (cvSubdiv2DLocate). 252 /// </summary> 253 /// <param name="pt">The point to locate. </param> 254 /// <param name="edge">The output edge the point falls onto or right to. </param> 255 /// <param name="vertex">Optional output vertex double pointer the input point coinsides with. </param> 256 /// <returns></returns> 257 #endif 218 258 public CvSubdiv2DPointLocation Locate(CvPoint2D32f pt, out CvSubdiv2DEdge edge, ref CvSubdiv2DPoint vertex) 219 259 { -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Struct/CvSubdiv2DEdge.cs
r32510 r32582 1 using System; 1 /* 2 * (C) 2008-2009 Schima 3 * This code is licenced under the LGPL. 4 */ 5 6 using System; 2 7 using System.Collections.Generic; 3 8 using System.Linq; … … 7 12 namespace KwsmLab.OpenCvSharp 8 13 { 14 #if LANG_JP 9 15 /// <summary> 10 16 /// 4辺の内の一つ.実体はUInt32であり、暗黙のキャストが定義されている. 11 17 /// 下位2ビットはインデックス(0...3)で, 上位ビットは4辺へのポインタ. 18 /// </summary> 19 #else 20 /// <summary> 21 /// one of edges within quad-edge, lower 2 bits is index (0..3) 22 /// and upper bits are quad-edge pointer 12 23 /// </summary> 13 24 /// <remarks> … … 15 26 /// typedef unsigned int size_t; 16 27 /// </remarks> 28 #endif 17 29 [Serializable] 18 30 [StructLayout(LayoutKind.Sequential)] 19 31 public struct CvSubdiv2DEdge 20 32 { 33 #if LANG_JP 21 34 /// <summary> 22 /// 実体データ 35 /// 実体データ (size_t型) 23 36 /// </summary> 37 #else 38 /// <summary> 39 /// Data (size_t) 40 /// </summary> 41 #endif 24 42 public uint Value; 25 43 26 44 45 #if LANG_JP 27 46 /// <summary> 28 47 /// 初期化 29 48 /// </summary> 30 49 /// <param name="value"></param> 50 #else 51 /// <summary> 52 /// Constructor 53 /// </summary> 54 /// <param name="value"></param> 55 #endif 31 56 public CvSubdiv2DEdge(uint value) 32 57 { … … 34 59 } 35 60 36 61 62 #if LANG_JP 37 63 /// <summary> 38 64 /// CvSubdiv2DEdgeからuintへの暗黙のキャスト … … 40 66 /// <param name="self"></param> 41 67 /// <returns></returns> 68 #else 69 /// <summary> 70 /// Implicit cast to uint 71 /// </summary> 72 /// <param name="self"></param> 73 /// <returns></returns> 74 #endif 42 75 public static implicit operator uint(CvSubdiv2DEdge self) 43 76 { 44 77 return self.Value; 45 78 } 79 #if LANG_JP 46 80 /// <summary> 47 81 /// uintからCvSubdiv2DEdgeへの暗黙のキャスト … … 49 83 /// <param name="v"></param> 50 84 /// <returns></returns> 85 #else 86 /// <summary> 87 /// Implicit cast from uint to CvSubdiv2DEdge 88 /// </summary> 89 /// <param name="v"></param> 90 /// <returns></returns> 91 #endif 51 92 public static implicit operator CvSubdiv2DEdge(uint v) 52 93 { … … 55 96 56 97 57 #region OpenCV メソッド98 #region OpenCV Methods 58 99 #region GetEdge 100 #if LANG_JP 59 101 /// <summary> 60 /// 入力された辺に関連する辺の一つを返す ( Subdiv2DGetEdge相当)102 /// 入力された辺に関連する辺の一つを返す (cvSubdiv2DGetEdge). 61 103 /// </summary> 62 104 /// <param name="type">戻り値とする辺の条件</param> 63 105 /// <returns>与えられた辺に関連する辺の一つ</returns> 106 #else 107 /// <summary> 108 /// Returns one of edges related to given (cvSubdiv2DGetEdge). 109 /// </summary> 110 /// <param name="type">Specifies, which of related edges to return</param> 111 /// <returns>one the edges related to the input edge</returns> 112 #endif 64 113 public CvSubdiv2DEdge GetEdge(CvNextEdgeType type) 65 114 { … … 68 117 #endregion 69 118 #region Dst 119 #if LANG_JP 70 120 /// <summary> 71 /// 辺の終点を返す. 72 /// 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す. 73 /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される 121 /// 辺の終点を返す (cvSubdiv2DEdgeDst). 122 /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される. 74 123 /// </summary> 75 /// <returns>辺の終点</returns> 124 /// <returns>辺の終点. 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す.</returns> 125 #else 126 /// <summary> 127 /// Returns edge destination (cvSubdiv2DEdgeDst). 128 /// </summary> 129 /// <returns>The edge destination. If the edge is from dual subdivision and the virtual point coordinates are not calculated yet, the returned pointer may be null.</returns> 130 #endif 76 131 public CvSubdiv2DPoint Dst() 77 132 { … … 80 135 #endregion 81 136 #region Org 137 #if LANG_JP 82 138 /// <summary> 83 /// 辺の始点を返す. 84 /// 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す. 85 /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される 139 /// 辺の始点を返す (cvSubdiv2DEdgeOrg). 140 /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される. 86 141 /// </summary> 87 /// <returns>辺の始点</returns> 142 /// <returns>辺の始点. 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す.</returns> 143 #else 144 /// <summary> 145 /// Returns edge origin (cvSubdiv2DEdgeOrg). 146 /// </summary> 147 /// <returns>The edge origin. If the edge is from dual subdivision and the virtual point coordinates are not calculated yet, the returned pointer may be null.</returns> 148 #endif 88 149 public CvSubdiv2DPoint Org() 89 150 { … … 92 153 #endregion 93 154 #region RotateEdge 155 #if LANG_JP 94 156 /// <summary> 95 /// 入力された辺を含むquad-edge中の辺の一つを返す (cvSubdiv2DRotateEdge相当). 96 /// </summary> 97 /// <param name="rotate">関係の指定(入力された辺と同じquad-edgeのどの辺を返すかを指定)</param> 98 /// <returns></returns> 99 public CvSubdiv2DEdge RotateEdge( RotateEdgeFlag rotate ) 100 { 101 return Cv.Subdiv2DRotateEdge(this, rotate); 102 } 157 /// 入力された辺を含むquad-edge中の辺の一つを返す (cvSubdiv2DRotateEdge). 158 /// </summary> 159 /// <param name="rotate">関係の指定(入力された辺と同じquad-edgeのどの辺を返すかを指定)</param> 160 /// <returns></returns> 161 #else 162 /// <summary> 163 /// Returns another edge of the same quad-edge (cvSubdiv2DRotateEdge). 164 /// </summary> 165 /// <returns>one the edges of the same quad-edge as the input edge. </returns> 166 #endif 167 public CvSubdiv2DEdge RotateEdge(RotateEdgeFlag rotate) 168 { 169 return Cv.Subdiv2DRotateEdge(this, rotate); 170 } 103 171 #endregion 104 172 #endregion 105 173 174 175 #if LANG_JP 106 176 /// <summary> 107 177 /// 文字列形式を返す 108 178 /// </summary> 109 179 /// <returns></returns> 180 #else 181 /// <summary> 182 /// Returns a System.String that represents the current CvSubdiv2DEdge's value 183 /// </summary> 184 /// <returns></returns> 185 #endif 110 186 public override string ToString() 111 187 {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)