Changeset 32582

Show
Ignore:
Timestamp:
04/18/09 18:37:46 (4 years ago)
Author:
schima
Message:

added japanese comments (subdiv)

Location:
lang/cpluspluscli/OpenCvSharp2/trunk
Files:
15 modified

Legend:

Unmodified
Added
Removed
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Blob/OpenCvSharp.Blob.vcproj

    r32561 r32582  
    6262                        <Tool 
    6363                                Name="VCLinkerTool" 
    64                                 AdditionalDependencies="cv.lib cxcore.lib cxts.lib highgui.lib ml.lib $(NOINHERIT)" 
     64                                AdditionalDependencies="cv.lib cxcore.lib cxts.lib $(NOINHERIT)" 
    6565                                LinkIncremental="2" 
    6666                                AdditionalLibraryDirectories="&quot;D:\logiciels\OpenCV\lib&quot;" 
     
    137137                        <Tool 
    138138                                Name="VCLinkerTool" 
    139                                 AdditionalDependencies="cv.lib cxcore.lib cxts.lib highgui.lib ml.lib $(NOINHERIT)" 
     139                                AdditionalDependencies="cv.lib cxcore.lib cxts.lib $(NOINHERIT)" 
    140140                                LinkIncremental="1" 
    141141                                AdditionalLibraryDirectories="&quot;C:\Program Files\OpenCV\lib&quot;" 
     
    211211                        <Tool 
    212212                                Name="VCLinkerTool" 
    213                                 AdditionalDependencies="cv.lib cxcore.lib cxts.lib highgui.lib ml.lib $(NOINHERIT)" 
     213                                AdditionalDependencies="cv.lib cxcore.lib cxts.lib $(NOINHERIT)" 
    214214                                LinkIncremental="2" 
    215215                                AdditionalLibraryDirectories="&quot;D:\logiciels\OpenCV\lib&quot;" 
     
    286286                        <Tool 
    287287                                Name="VCLinkerTool" 
    288                                 AdditionalDependencies="cv.lib cxcore.lib cxts.lib highgui.lib ml.lib $(NOINHERIT)" 
     288                                AdditionalDependencies="cv.lib cxcore.lib cxts.lib $(NOINHERIT)" 
    289289                                LinkIncremental="1" 
    290290                                AdditionalLibraryDirectories="&quot;C:\Program Files\OpenCV\lib&quot;" 
     
    344344        <Files> 
    345345                <Filter 
    346                         Name="�\�[�X �t�@�C��" 
     346                        Name="Source Files" 
    347347                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" 
    348348                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 
     
    414414                </Filter> 
    415415                <Filter 
    416                         Name="�w�b�_�[ �t�@�C��" 
     416                        Name="Header Files" 
    417417                        Filter="h;hpp;hxx;hm;inl;inc;xsd" 
    418418                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 
     
    452452                </Filter> 
    453453                <Filter 
    454                         Name="���\�[�X �t�@�C��" 
     454                        Name="Resource Files" 
    455455                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" 
    456456                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Blob/Stdafx.h

    r31883 r32582  
    66 
    77#include <cv.h> 
    8 #include <highgui.h> 
    98#include <msclr/marshal.h> 
    109 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/CvInline.h

    r32539 r32582  
    314314                                } 
    315315 
     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                                } 
    316322                        }; 
    317323                } 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/OpenCvSharp.Extern.vcproj

    r32564 r32582  
    22<VisualStudioProject 
    33        ProjectType="Visual C++" 
    4         Version="9,00" 
     4        Version="9.00" 
    55        Name="OpenCvSharp.Extern" 
    66        ProjectGUID="{38E4FA6B-0F95-4020-98C4-D8828A20699F}" 
     
    411411        <Files> 
    412412                <Filter 
    413                         Name="�\�[�X �t�@�C��" 
     413                        Name="Source Files" 
    414414                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" 
    415415                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 
     
    613613                </Filter> 
    614614                <Filter 
    615                         Name="�w�b�_�[ �t�@�C��" 
     615                        Name="Header Files" 
    616616                        Filter="h;hpp;hxx;hm;inl;inc;xsd" 
    617617                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 
     
    775775                </Filter> 
    776776                <Filter 
    777                         Name="���\�[�X �t�@�C��" 
     777                        Name="Resource Files" 
    778778                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" 
    779779                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/WCvSubdiv2DPoint.h

    r31568 r32582  
    1111namespace Extern 
    1212{ 
    13             /// <summary> 
    14     /// オリジナルの細分割と双対細分割の点を表すクラス 
     13        /// <summary> 
     14    /// Point of original or dual subdivision 
    1515    /// </summary> 
    1616        public ref class WCvSubdiv2DPoint 
     
    2121        public: 
    2222                /// <summary> 
    23                 /// 元データであるCvSubdiv2DPoint*を取得する 
     23                /// CvSubdiv2DPoint* 
    2424                /// </summary> 
    2525                initonly IntPtr Ptr; 
    2626                /// <summary> 
    27                 /// sizeof(CvSubdiv2DPoint) を取得する 
     27                /// sizeof(CvSubdiv2DPoint) 
    2828                /// </summary> 
    2929                literal Int32 SizeOf = static_cast<Int32>(sizeof(CvSubdiv2DPoint));  
    3030 
    3131                /// <summary> 
    32                 /// 初期化 
     32                /// Constructor 
    3333                /// </summary> 
    3434                WCvSubdiv2DPoint(IntPtr ptr) 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.MachineLearning/OpenCvSharp.MachineLearning.vcproj

    r32555 r32582  
    22<VisualStudioProject 
    33        ProjectType="Visual C++" 
    4         Version="9,00" 
     4        Version="9.00" 
    55        Name="OpenCvSharp.MachineLearning" 
    66        ProjectGUID="{A40523C9-C39B-4628-92C8-84E904FF3626}" 
     
    261261        <Files> 
    262262                <Filter 
    263                         Name="�\�[�X �t�@�C��" 
     263                        Name="Source Files" 
    264264                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" 
    265265                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 
     
    339339                </Filter> 
    340340                <Filter 
    341                         Name="�w�b�_�[ �t�@�C��" 
     341                        Name="Header Files" 
    342342                        Filter="h;hpp;hxx;hm;inl;inc;xsd" 
    343343                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" 
     
    417417                </Filter> 
    418418                <Filter 
    419                         Name="���\�[�X �t�@�C��" 
     419                        Name="Resource Files" 
    420420                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" 
    421421                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Test/Program.cs

    r32568 r32582  
    8282            //new Test.CornerDetect();                // コーナーの検出 
    8383 
    84             //new Test.Delaunay();                    // ドロネー 
     84            new Test.Delaunay();                    // ドロネー 
    8585 
    8686            //new Test.DFT();                         // 離散フーリエ変換 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Test/Samples/Delaunay.cs

    r32568 r32582  
    2626            { 
    2727                img.Set(bkgnd_color); 
    28                 CvSubdiv2D subdiv = new CvSubdiv2D(storage, rect); 
     28                CvSubdiv2D subdiv = new CvSubdiv2D(rect, storage); 
    2929                for (int i = 0; i < 200; i++) 
    3030                { 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Class/CvQuadEdge2D.cs

    r32510 r32582  
    77namespace KwsmLab.OpenCvSharp 
    88{ 
     9#if LANG_JP 
    910    /// <summary> 
    1011    /// 平面細分割のQuad-edge構造体 
    1112    /// </summary> 
     13#else 
     14    /// <summary> 
     15    /// Quad-edge of planar subdivision 
     16    /// </summary> 
     17#endif 
    1218    public class CvQuadEdge2D : ICvPtrHolder 
    1319    { 
    1420        /// <summary> 
    15         /// C++/CLI側でポインタにアクセスするオブジェクト 
     21        /// C++/CLI wrapper of native structure's poitner 
    1622        /// </summary> 
    1723        private Extern.WCvQuadEdge2D data; 
    1824        /// <summary> 
    19         /// データポインタ 
     25        /// native structure's pointer 
    2026        /// </summary> 
    2127        private IntPtr ptr; 
    2228 
    2329 
    24         #region 初期化・キャスト演算子 
     30        #region Initialization & Operators 
     31#if LANG_JP 
    2532        /// <summary> 
    2633        /// ポインタから初期化 
    2734        /// </summary> 
    2835        /// <param name="ptr">CvQuadEdge2D*</param> 
     36#else 
     37        /// <summary> 
     38        /// Initializes from native pointer 
     39        /// </summary> 
     40        /// <param name="ptr"></param> 
     41#endif 
    2942        public CvQuadEdge2D(IntPtr ptr) 
    3043        { 
     
    3245            this.data = new Extern.WCvQuadEdge2D(ptr); 
    3346        } 
     47#if LANG_JP 
    3448        /// <summary> 
    35         /// ポインタからオブジェクトを生成して返す 
     49        /// ポインタからオブジェクトを生成する 
    3650        /// </summary> 
    3751        /// <param name="ptr"></param> 
    3852        /// <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 
    3960        public static CvQuadEdge2D FromPtr(IntPtr ptr) 
    4061        { 
     
    4566            return new CvQuadEdge2D(ptr); 
    4667        } 
     68#if LANG_JP 
    4769        /// <summary> 
    4870        /// ポインタからの明示的なキャスト 
     
    5072        /// <param name="ptr"></param> 
    5173        /// <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 
    5281        public static explicit operator CvQuadEdge2D(IntPtr ptr) 
    5382        { 
     
    5887            return new CvQuadEdge2D(ptr); 
    5988        } 
     89#if LANG_JP 
    6090        /// <summary> 
    61         /// CvSeqReaderからオブジェクトを読み込んで返す 
     91        /// CvSeqReaderからCvQuadEdge2Dのインスタンスを読み込んで返す 
    6292        /// </summary> 
    6393        /// <param name="reader"></param> 
    6494        /// <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) 
    66103        { 
    67104            if (reader == null) 
     
    72109        } 
    73110 
     111#if LANG_JP 
    74112        /// <summary> 
    75113        /// CvSubdiv2DEdgeへの明示的キャスト 
    76114        /// </summary> 
    77115        /// <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) 
    79124        { 
    80125            return self.ToCvSubdiv2DEdge(); 
    81126        } 
    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()); 
    88140            //uint value = (uint)Marshal.ReadInt32(this.CvPtr); 
    89141            //return new CvSubdiv2DEdge(value); 
    90             } 
     142        } 
    91143        #endregion 
    92144 
     
    94146        #region プロパティ 
    95147        /// <summary> 
    96         /// sizeof(CvQuadEdge2D) を取得する 
     148        /// sizeof(CvQuadEdge2D) 
    97149        /// </summary> 
    98150        public const Int32 SizeOf = Extern.WCvQuadEdge2D.SizeOf; 
    99151        /// <summary> 
    100         /// データポインタ(CvQuadEdge2D*)を取得する 
     152        /// Data pointer (CvQuadEdge2D*) 
    101153        /// </summary> 
    102154        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 
     6using System; 
    27using System.Collections.Generic; 
    38using System.Linq; 
     
    712namespace KwsmLab.OpenCvSharp 
    813{ 
     14#if LANG_JP 
    915    /// <summary> 
    1016    /// オリジナルの細分割と双対細分割の点を表すクラス 
    1117    /// </summary> 
     18#else 
     19    /// <summary> 
     20    /// Point of original or dual subdivision 
     21    /// </summary> 
     22#endif 
    1223    public class CvSubdiv2DPoint : DisposableObject, ICvPtrHolder 
    1324    { 
    1425        /// <summary> 
    15         /// C++/CLI側でポインタにアクセスするオブジェクト 
     26        /// C++/CLI wrapper of native structure's pointer 
    1627        /// </summary> 
    1728        private Extern.WCvSubdiv2DPoint data; 
    1829        /// <summary> 
    19         /// データポインタ 
     30        /// data pointer 
    2031        /// </summary> 
    2132        private IntPtr ptr; 
    2233 
    2334 
     35#if LANG_JP 
    2436        /// <summary> 
    2537        /// ポインタから初期化 
    2638        /// </summary> 
    2739        /// <param name="ptr"></param> 
     40#else 
     41        /// <summary> 
     42        /// Initializes from native pointer 
     43        /// </summary> 
     44        /// <param name="ptr"></param> 
     45#endif 
    2846        public CvSubdiv2DPoint(IntPtr ptr) 
    2947        { 
     
    3250            base.NotifyMemoryPressure(SizeOf); 
    3351        } 
     52#if LANG_JP 
    3453        /// <summary> 
    3554        /// ポインタからオブジェクトを生成して返す 
     
    3756        /// <param name="ptr"></param> 
    3857        /// <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 
    3965        public static CvSubdiv2DPoint FromPtr(IntPtr ptr) 
    4066        { 
     
    4571            return new CvSubdiv2DPoint(ptr); 
    4672        } 
     73#if LANG_JP 
    4774        /// <summary> 
    4875        /// ポインタからの明示的なキャスト 
     
    5077        /// <param name="ptr"></param> 
    5178        /// <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 
    5286        public static explicit operator CvSubdiv2DPoint(IntPtr ptr) 
    5387        { 
     
    6296        #region プロパティ 
    6397        /// <summary> 
    64         /// sizeof(CvSubdiv2D) を取得する 
     98        /// sizeof(CvSubdiv2D)  
    6599        /// </summary> 
    66100        public const int SizeOf = Extern.WCvSubdiv2DPoint.SizeOf; 
    67101        /// <summary> 
    68         /// データポインタ(CvSubdiv2D*)を取得する 
     102        /// Data pointer (CvSubdiv2D*) 
    69103        /// </summary> 
    70104        public IntPtr CvPtr 
     
    73107        } 
    74108 
     109#if LANG_JP 
    75110        /// <summary> 
    76111        /// 様々なフラグ 
    77112        /// </summary> 
     113#else 
     114        /// <summary> 
     115        /// Various flags 
     116        /// </summary> 
     117#endif 
    78118        public int Flags 
    79119        { 
    80120            get { return data.flags; } 
    81121        } 
     122#if LANG_JP 
    82123        /// <summary> 
    83124        ///  
    84125        /// </summary> 
     126#else 
     127        /// <summary> 
     128        ///  
     129        /// </summary> 
     130#endif 
    85131        public uint First 
    86132        { 
    87133            get { return data.first; } 
    88134        } 
     135#if LANG_JP 
    89136        /// <summary> 
    90137        ///  
    91138        /// </summary> 
     139#else 
     140        /// <summary> 
     141        ///  
     142        /// </summary> 
     143#endif 
    92144        public CvPoint2D32f Pt 
    93145        { 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_A-C.cs

    r32565 r32582  
    18461846        #endregion 
    18471847        #region CalcSubdivVoronoi2D 
     1848#if LANG_JP 
    18481849        /// <summary> 
    18491850        /// 仮想点の座標を計算する.元の細分割面のある頂点に対応する仮想点全てを接続すると,その頂点を含むボロノイ領域の境界を構成する.  
    18501851        /// </summary> 
    18511852        /// <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 
    18521859        public static void CalcSubdivVoronoi2D(CvSubdiv2D subdiv) 
    18531860        { 
     
    25012508        #endregion 
    25022509        #region ClearSubdivVoronoi2D 
     2510#if LANG_JP 
    25032511        /// <summary> 
    25042512        /// 全ての仮想点を削除する.  
     
    25062514        /// </summary> 
    25072515        /// <param name="subdiv">ドロネー細分割</param> 
     2516#else 
     2517        /// <summary> 
     2518        /// Removes all virtual points 
     2519        /// </summary> 
     2520        /// <param name="subdiv">Delaunay subdivision. </param> 
     2521#endif 
    25082522        public static void ClearSubdivVoronoi2D(CvSubdiv2D subdiv) 
    25092523        { 
     
    43444358        #endregion 
    43454359        #region CreateSubdiv2D 
     4360#if LANG_JP 
    43464361        /// <summary> 
    43474362        /// CvSubdiv2Dを生成する。 
     
    43544369        /// <param name="storage"></param> 
    43554370        /// <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 
    43564383        public static CvSubdiv2D CreateSubdiv2D(SeqType subdiv_type, Int32 header_size, Int32 vtx_size, Int32 quadedge_size, CvMemStorage storage) 
    43574384        { 
     
    43604387                throw new ArgumentNullException("storage"); 
    43614388            } 
    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) 
    43644391                return null; 
    43654392            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); 
    43674423        } 
    43684424        #endregion 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_D-G.cs

    r32533 r32582  
    13811381        #endregion 
    13821382        #region FindNearestPoint2D 
     1383#if LANG_JP 
    13831384        /// <summary> 
    13841385        /// 与えられた点に最も近い細分割の頂点を求める. 入力点を細分割内に配置するもう一つの関数である. 
     
    13881389        /// <param name="pt">入力点</param> 
    13891390        /// <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) 
    13911400        { 
    13921401            if (subdiv == null) 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_R-Z.cs

    r32510 r32582  
    30833083        #endregion 
    30843084        #region Subdiv2DEdgeDst 
     3085#if LANG_JP 
    30853086        /// <summary> 
    30863087        /// 辺の終点を返す.  
    3087         /// 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す.  
    3088         /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される 
     3088        /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される. 
    30893089        /// </summary> 
    30903090        /// <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 
    30923099        public static CvSubdiv2DPoint Subdiv2DEdgeDst(CvSubdiv2DEdge edge) 
    30933100        { 
     
    31003107        #endregion 
    31013108        #region Subdiv2DEdgeOrg 
     3109#if LANG_JP 
    31023110        /// <summary> 
    31033111        /// 辺の始点を返す.  
    3104         /// 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す.  
    3105         /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される 
     3112        /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される. 
    31063113        /// </summary> 
    31073114        /// <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 
    31093123        public static CvSubdiv2DPoint Subdiv2DEdgeOrg(CvSubdiv2DEdge edge) 
    31103124        { 
     
    31173131        #endregion 
    31183132        #region Subdiv2DGetEdge 
     3133#if LANG_JP 
    31193134        /// <summary> 
    31203135        /// 入力された辺に関連する辺の一つを返す 
     
    31233138        /// <param name="type">戻り値とする辺の条件</param> 
    31243139        /// <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 
    31253148        public static CvSubdiv2DEdge Subdiv2DGetEdge(CvSubdiv2DEdge edge, CvNextEdgeType type) 
    31263149        { 
     
    31293152        #endregion 
    31303153        #region Subdiv2DLocate 
     3154#if LANG_JP 
    31313155        /// <summary> 
    31323156        /// ドロネー三角形に点を追加する 
     
    31363160        /// <param name="edge">出力される辺.配置した点は,その辺上または端に存在する.</param> 
    31373161        /// <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 
    31383171        public static CvSubdiv2DPointLocation Subdiv2DLocate(CvSubdiv2D subdiv, CvPoint2D32f pt, out CvSubdiv2DEdge edge) 
    31393172        { 
     
    31483181            return result; 
    31493182        } 
     3183#if LANG_JP 
    31503184        /// <summary> 
    31513185        /// ドロネー三角形に点を追加する 
     
    31563190        /// <param name="vertex">オプション出力.入力点と一致する細分割の頂点へのポインタのポインタ</param> 
    31573191        /// <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 
    31583202        public static CvSubdiv2DPointLocation Subdiv2DLocate(CvSubdiv2D subdiv, CvPoint2D32f pt, out CvSubdiv2DEdge edge, ref CvSubdiv2DPoint vertex) 
    31593203        { 
     
    31783222        #endregion 
    31793223        #region Subdiv2DRotateEdge 
     3224#if LANG_JP 
    31803225        /// <summary> 
    31813226        /// 入力された辺を含むquad-edge中の辺の一つを返す. 
     
    31843229        /// <param name="rotate">関係の指定(入力された辺と同じquad-edgeのどの辺を返すかを指定)</param> 
    31853230        /// <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 
    31863239        public static CvSubdiv2DEdge Subdiv2DRotateEdge(CvSubdiv2DEdge edge, RotateEdgeFlag rotate) 
    31873240        { 
     
    31903243        #endregion 
    31913244        #region SubdivDelaunay2DInsert 
     3245#if LANG_JP 
    31923246        /// <summary> 
    31933247        /// ドロネー三角形に点を追加する 
     
    31963250        /// <param name="pt">追加する点</param> 
    31973251        /// <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 
    31983260        public static CvSubdiv2DPoint SubdivDelaunay2DInsert(CvSubdiv2D subdiv, CvPoint2D32f pt) 
    31993261        { 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/CvArr/CvSubdiv2D.cs

    r32510 r32582  
    33using System.Linq; 
    44using System.Text; 
     5using KwsmLab.OpenCvSharp.Extern; 
    56 
    67namespace KwsmLab.OpenCvSharp 
     
    2728 
    2829 
    29 #if LANG_JP 
    30         /// <summary> 
    31             /// cvCreateSubdiv2DとcvInitSubdivDelaunay2で初期化 
     30        #region Constructors & Destructors 
     31#if LANG_JP 
     32        /// <summary> 
     33            /// cvCreateSubdivDelaunay2Dで初期化 
    3234            /// </summary> 
     35        /// <param name="rect"></param> 
    3336            /// <param name="storage"></param> 
    34             /// <param name="rect"></param> 
    35 #else 
    36         /// <summary> 
    37         /// Initializes by cvCreateSubdiv2D and cvInitSubdivDelaunay2 
    38         /// </summary> 
     37#else 
     38        /// <summary> 
     39        /// Initializes using cvCreateSubdivDelaunay2D 
     40        /// </summary> 
     41        /// <param name="rect"></param> 
    3942        /// <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) 
    4345            : 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) 
    4647            ) 
    4748        { 
    48             CvDll.cvInitSubdivDelaunay2D(this.ptr, rect); 
    4949        } 
    5050#if LANG_JP 
     
    8383            base.Dispose(); 
    8484        } 
    85  
    86         #region プロパティ 
     85        #endregion 
     86 
     87 
     88        #region Properties 
    8789        /// <summary> 
    8890        /// sizeof(CvSubdiv2D) 
     
    166168 
    167169 
    168         #region OpenCV メソッド 
     170        #region OpenCV Methods 
    169171        #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 
    173181        public void CalcVoronoi2D() 
    174182        { 
     
    177185        #endregion 
    178186        #region ClearVoronoi2D 
    179         /// <summary> 
    180         /// 全ての仮想点を削除する.  
     187#if LANG_JP 
     188        /// <summary> 
     189        /// 全ての仮想点を削除する (cvClearSubdivVoronoi2D).  
    181190        /// この関数の前回の呼出し後に細分割が変更された場合,この関数は cvCalcSubdivVoronoi2D の内部で呼ばれる.  
    182191        /// </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); 
    187200        } 
    188201        #endregion 
    189202        #region Insert 
    190         /// <summary> 
    191         /// ドロネー三角形に点を追加する (SubdivDelaunay2D相当) 
     203#if LANG_JP 
     204        /// <summary> 
     205        /// ドロネー三角形に点を追加する (cvSubdivDelaunay2D). 
    192206        /// </summary> 
    193207        /// <param name="pt">追加する点</param> 
    194208        /// <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 
    195216        public CvSubdiv2DPoint Insert(CvPoint2D32f pt) 
    196217        { 
     
    199220        #endregion 
    200221        #region Locate 
    201         /// <summary> 
    202         /// ドロネー三角形に点を追加する (Subdiv2DLocate相当) 
     222#if LANG_JP 
     223        /// <summary> 
     224        /// ドロネー三角形に点を追加する (cvSubdiv2DLocate). 
    203225        /// </summary> 
    204226        /// <param name="pt">配置する点</param> 
    205227        /// <param name="edge">出力される辺.配置した点は,その辺上または端に存在する.</param> 
    206228        /// <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 
    207237        public CvSubdiv2DPointLocation Locate(CvPoint2D32f pt, out CvSubdiv2DEdge edge) 
    208238        { 
    209239            return Cv.Subdiv2DLocate(this, pt, out edge); 
    210240        } 
    211         /// <summary> 
    212         /// ドロネー三角形に点を追加する (Subdiv2DLocate相当) 
     241#if LANG_JP 
     242        /// <summary> 
     243        /// ドロネー三角形に点を追加する (cvSubdiv2DLocate). 
    213244        /// </summary> 
    214245        /// <param name="pt">配置する点</param> 
     
    216247        /// <param name="vertex">オプション出力.入力点と一致する細分割の頂点へのポインタのポインタ</param> 
    217248        /// <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 
    218258        public CvSubdiv2DPointLocation Locate(CvPoint2D32f pt, out CvSubdiv2DEdge edge, ref CvSubdiv2DPoint vertex) 
    219259        { 
  • 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 
     6using System; 
    27using System.Collections.Generic; 
    38using System.Linq; 
     
    712namespace KwsmLab.OpenCvSharp 
    813{ 
     14#if LANG_JP 
    915    /// <summary> 
    1016    /// 4辺の内の一つ.実体はUInt32であり、暗黙のキャストが定義されている. 
    1117    /// 下位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 
    1223    /// </summary> 
    1324    /// <remarks> 
     
    1526    /// typedef unsigned int size_t; 
    1627    /// </remarks> 
     28#endif 
    1729    [Serializable] 
    1830    [StructLayout(LayoutKind.Sequential)] 
    1931    public struct CvSubdiv2DEdge 
    2032    { 
     33#if LANG_JP 
    2134        /// <summary> 
    22         /// 実体データ 
     35        /// 実体データ (size_t型) 
    2336        /// </summary> 
     37#else 
     38        /// <summary> 
     39        /// Data (size_t) 
     40        /// </summary> 
     41#endif 
    2442        public uint Value; 
    2543 
    2644 
     45#if LANG_JP 
    2746        /// <summary> 
    2847        /// 初期化 
    2948        /// </summary> 
    3049        /// <param name="value"></param> 
     50#else 
     51        /// <summary> 
     52        /// Constructor 
     53        /// </summary> 
     54        /// <param name="value"></param> 
     55#endif 
    3156        public CvSubdiv2DEdge(uint value) 
    3257        { 
     
    3459        } 
    3560 
    36          
     61 
     62#if LANG_JP 
    3763        /// <summary> 
    3864        /// CvSubdiv2DEdgeからuintへの暗黙のキャスト 
     
    4066        /// <param name="self"></param> 
    4167        /// <returns></returns> 
     68#else 
     69        /// <summary> 
     70        /// Implicit cast to uint 
     71        /// </summary> 
     72        /// <param name="self"></param> 
     73        /// <returns></returns> 
     74#endif 
    4275        public static implicit operator uint(CvSubdiv2DEdge self) 
    4376        { 
    4477            return self.Value; 
    4578        } 
     79#if LANG_JP 
    4680        /// <summary> 
    4781        /// uintからCvSubdiv2DEdgeへの暗黙のキャスト 
     
    4983        /// <param name="v"></param> 
    5084        /// <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 
    5192        public static implicit operator CvSubdiv2DEdge(uint v) 
    5293        { 
     
    5596 
    5697 
    57         #region OpenCV メソッド 
     98        #region OpenCV Methods 
    5899        #region GetEdge 
     100#if LANG_JP 
    59101        /// <summary> 
    60         /// 入力された辺に関連する辺の一つを返す (Subdiv2DGetEdge相当) 
     102        /// 入力された辺に関連する辺の一つを返す (cvSubdiv2DGetEdge). 
    61103        /// </summary> 
    62104        /// <param name="type">戻り値とする辺の条件</param> 
    63105        /// <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 
    64113        public CvSubdiv2DEdge GetEdge(CvNextEdgeType type) 
    65114        { 
     
    68117        #endregion 
    69118        #region Dst 
     119#if LANG_JP 
    70120        /// <summary> 
    71         /// 辺の終点を返す.  
    72         /// 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す.  
    73         /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される 
     121        /// 辺の終点を返す (cvSubdiv2DEdgeDst). 
     122        /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される. 
    74123        /// </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 
    76131        public CvSubdiv2DPoint Dst() 
    77132        { 
     
    80135        #endregion 
    81136        #region Org 
     137#if LANG_JP 
    82138        /// <summary> 
    83         /// 辺の始点を返す.  
    84         /// 辺が双対細分割のものであり,仮想点の座標がまだ計算されていない場合は,nullを返す.  
    85         /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される 
     139        /// 辺の始点を返す (cvSubdiv2DEdgeOrg).  
     140        /// 仮想点は関数 cvCalcSubdivVoronoi2D を用いて計算される. 
    86141        /// </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 
    88149        public CvSubdiv2DPoint Org() 
    89150        { 
     
    92153        #endregion 
    93154        #region RotateEdge 
     155#if LANG_JP 
    94156        /// <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        } 
    103171        #endregion 
    104172        #endregion 
    105173 
     174 
     175#if LANG_JP 
    106176        /// <summary> 
    107177        /// 文字列形式を返す 
    108178        /// </summary> 
    109179        /// <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 
    110186        public override string ToString() 
    111187        {