Changeset 32138 for lang/cpluspluscli

Show
Ignore:
Timestamp:
04/08/09 21:32:04 (4 years ago)
Author:
schima
Message:

added comments in Japanese (ApproxChain?)

Location:
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Core/CvDll.cs

    r32098 r32138  
    3232        public static extern void cvAdaptiveThreshold(IntPtr src, IntPtr dst, double max_value, AdaptiveThresholdType adaptiveType, ThresholdType threshold_type, int block_size, double param1); 
    3333        [DllImport(DLL_CV)] 
    34         public static extern IntPtr cvApproxChains(IntPtr src_seq, IntPtr storage, [MarshalAs(UnmanagedType.U4)] ContourChain method, double parameter, int minimal_perimeter, int recursive); 
     34        public static extern IntPtr cvApproxChains(IntPtr src_seq, IntPtr storage, [MarshalAs(UnmanagedType.U4)] ContourChain method, double parameter, int minimal_perimeter, [MarshalAs(UnmanagedType.Bool)] bool recursive); 
    3535        [DllImport(DLL_CV)] 
    3636        public static extern IntPtr cvApproxPoly(IntPtr src_seq, int header_size, IntPtr storage, ApproxPolyMethod method, double parameter, [MarshalAs(UnmanagedType.Bool)] bool parameter2); 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Core/Cv_A-C.cs

    r32111 r32138  
    448448        #region ApproxChains 
    449449#if LANG_JP 
    450 /// <summary> 
    451         ///  
    452         /// </summary> 
    453         /// <param name="src_seq"></param> 
    454         /// <param name="storage"></param> 
     450        /// <summary> 
     451        /// フリーマンチェーン(Freeman chain)をポリラインで近似する 
     452        /// </summary> 
     453        /// <param name="src_seq">他のチェーンから参照可能なチェーンへの参照.</param> 
     454        /// <param name="storage">計算結果保存用のストレージ.</param> 
    455455        /// <returns></returns> 
    456456#else 
     
    464464        public static CvSeq<CvPoint> ApproxChains(this CvChain<CvPoint> src_seq, CvMemStorage storage) 
    465465        { 
    466             return ApproxChains(src_seq, storage, ContourChain.ApproxSimple); 
    467         } 
    468 #if LANG_JP 
    469 /// <summary> 
    470         ///  
    471         /// </summary> 
    472         /// <param name="src_seq"></param> 
    473         /// <param name="storage"></param> 
    474         /// <param name="method"></param> 
     466            return ApproxChains(src_seq, storage, ContourChain.ApproxSimple, 0, 0, false); 
     467        } 
     468#if LANG_JP 
     469        /// <summary> 
     470        /// フリーマンチェーン(Freeman chain)をポリラインで近似する 
     471        /// </summary> 
     472        /// <param name="src_seq">他のチェーンから参照可能なチェーンへの参照.</param> 
     473        /// <param name="storage">計算結果保存用のストレージ.</param> 
     474        /// <param name="method">推定手法.</param> 
    475475        /// <returns></returns> 
    476476#else 
     
    480480        /// <param name="src_seq">Freeman chain(s) </param> 
    481481        /// <param name="storage">Storage location for the resulting polylines. </param> 
    482         /// <param name="method">Approximation method (for all the modes, except CV_RETR_RUNS, which uses built-in approximation). 
    483         /// * CV_CHAIN_CODE - output contours in the Freeman chain code. All other methods output polygons (sequences of vertices). 
    484         /// * CV_CHAIN_APPROX_NONE - translate all the points from the chain code into points; 
    485         /// * CV_CHAIN_APPROX_SIMPLE - compress horizontal, vertical, and diagonal segments, that is, the function leaves only their ending points; 
    486         /// * CV_CHAIN_APPROX_TC89_L1, 
    487         /// * CV_CHAIN_APPROX_TC89_KCOS - apply one of the flavors of Teh-Chin chain approximation algorithm. CV_LINK_RUNS - use completely different contour retrieval algorithm via linking of horizontal segments of 1’s. Only CV_RETR_LIST retrieval mode can be used with this method. </param> 
    488         /// <returns></returns> 
     482        /// <param name="method">Approximation method.</param> 
     483        /// /// <returns></returns> 
    489484#endif 
    490485        public static CvSeq<CvPoint> ApproxChains(this CvChain<CvPoint> src_seq, CvMemStorage storage, ContourChain method) 
    491486        { 
    492             return ApproxChains(src_seq, storage, method, 0); 
    493         } 
    494 #if LANG_JP 
    495 /// <summary> 
    496         ///  
    497         /// </summary> 
    498         /// <param name="src_seq"></param> 
    499         /// <param name="storage"></param> 
    500         /// <param name="method"></param> 
    501         /// <param name="parameter"></param> 
     487            return ApproxChains(src_seq, storage, method, 0, 0, false); 
     488        } 
     489#if LANG_JP 
     490        /// <summary> 
     491        /// フリーマンチェーン(Freeman chain)をポリラインで近似する 
     492        /// </summary> 
     493        /// <param name="src_seq">他のチェーンから参照可能なチェーンへの参照.</param> 
     494        /// <param name="storage">計算結果保存用のストレージ.</param> 
     495        /// <param name="method">推定手法.</param> 
     496        /// <param name="parameter">メソッドパラメータ(現在は使われていない).</param> 
    502497        /// <returns></returns> 
    503498#else 
     
    507502        /// <param name="src_seq">Freeman chain(s) </param> 
    508503        /// <param name="storage">Storage location for the resulting polylines. </param> 
    509         /// <param name="method">Approximation method (for all the modes, except CV_RETR_RUNS, which uses built-in approximation). 
    510         /// * CV_CHAIN_CODE - output contours in the Freeman chain code. All other methods output polygons (sequences of vertices). 
    511         /// * CV_CHAIN_APPROX_NONE - translate all the points from the chain code into points; 
    512         /// * CV_CHAIN_APPROX_SIMPLE - compress horizontal, vertical, and diagonal segments, that is, the function leaves only their ending points; 
    513         /// * CV_CHAIN_APPROX_TC89_L1, 
    514         /// * CV_CHAIN_APPROX_TC89_KCOS - apply one of the flavors of Teh-Chin chain approximation algorithm. CV_LINK_RUNS - use completely different contour retrieval algorithm via linking of horizontal segments of 1’s. Only CV_RETR_LIST retrieval mode can be used with this method. </param> 
     504        /// <param name="method">Approximation method.</param> 
    515505        /// <param name="parameter">Method parameter (not used now). </param> 
    516506        /// <returns></returns> 
     
    518508        public static CvSeq<CvPoint> ApproxChains(this CvChain<CvPoint> src_seq, CvMemStorage storage, ContourChain method, double parameter) 
    519509        { 
    520             return ApproxChains(src_seq, storage, method, parameter, 0); 
    521         } 
    522 #if LANG_JP 
    523 /// <summary> 
    524         ///  
    525         /// </summary> 
    526         /// <param name="src_seq"></param> 
    527         /// <param name="storage"></param> 
    528         /// <param name="method"></param> 
    529         /// <param name="parameter"></param> 
     510            return ApproxChains(src_seq, storage, method, parameter, 0, false); 
     511        } 
     512#if LANG_JP 
     513        /// <summary> 
     514        /// フリーマンチェーン(Freeman chain)をポリラインで近似する 
     515        /// </summary> 
     516        /// <param name="src_seq">他のチェーンから参照可能なチェーンへの参照.</param> 
     517        /// <param name="storage">計算結果保存用のストレージ.</param> 
     518        /// <param name="method">推定手法.</param> 
     519        /// <param name="parameter">メソッドパラメータ(現在は使われていない).</param> 
    530520        /// <param name="minimal_perimeter"></param> 
    531521        /// <returns></returns> 
     
    536526        /// <param name="src_seq">Freeman chain(s) </param> 
    537527        /// <param name="storage">Storage location for the resulting polylines. </param> 
    538         /// <param name="method">Approximation method (for all the modes, except CV_RETR_RUNS, which uses built-in approximation). 
    539         /// * CV_CHAIN_CODE - output contours in the Freeman chain code. All other methods output polygons (sequences of vertices). 
    540         /// * CV_CHAIN_APPROX_NONE - translate all the points from the chain code into points; 
    541         /// * CV_CHAIN_APPROX_SIMPLE - compress horizontal, vertical, and diagonal segments, that is, the function leaves only their ending points; 
    542         /// * CV_CHAIN_APPROX_TC89_L1, 
    543         /// * CV_CHAIN_APPROX_TC89_KCOS - apply one of the flavors of Teh-Chin chain approximation algorithm. CV_LINK_RUNS - use completely different contour retrieval algorithm via linking of horizontal segments of 1’s. Only CV_RETR_LIST retrieval mode can be used with this method. </param> 
     528        /// <param name="method">Approximation method.</param> 
    544529        /// <param name="parameter">Method parameter (not used now). </param> 
    545530        /// <param name="minimal_perimeter">Approximates only those contours whose perimeters are not less than minimal_perimeter. Other chains are removed from the resulting structure. </param> 
     
    548533        public static CvSeq<CvPoint> ApproxChains(this CvChain<CvPoint> src_seq, CvMemStorage storage, ContourChain method, double parameter, int minimal_perimeter) 
    549534        { 
    550             return ApproxChains(src_seq, storage, method, parameter, minimal_perimeter, 0); 
    551         } 
    552 #if LANG_JP 
    553 /// <summary> 
    554         ///  
    555         /// </summary> 
    556         /// <param name="src_seq"></param> 
    557         /// <param name="storage"></param> 
    558         /// <param name="method"></param> 
    559         /// <param name="parameter"></param> 
     535            return ApproxChains(src_seq, storage, method, parameter, minimal_perimeter, false); 
     536        } 
     537#if LANG_JP 
     538        /// <summary> 
     539        /// フリーマンチェーン(Freeman chain)をポリラインで近似する 
     540        /// </summary> 
     541        /// <param name="src_seq">他のチェーンから参照可能なチェーンへの参照.</param> 
     542        /// <param name="storage">計算結果保存用のストレージ.</param> 
     543        /// <param name="method">推定手法.</param> 
     544        /// <param name="parameter">メソッドパラメータ(現在は使われていない).</param> 
    560545        /// <param name="minimal_perimeter"></param> 
    561546        /// <param name="recursive"></param> 
     
    567552        /// <param name="src_seq">Freeman chain(s) </param> 
    568553        /// <param name="storage">Storage location for the resulting polylines. </param> 
    569         /// <param name="method">Approximation method (for all the modes, except CV_RETR_RUNS, which uses built-in approximation). 
    570         /// * CV_CHAIN_CODE - output contours in the Freeman chain code. All other methods output polygons (sequences of vertices). 
    571         /// * CV_CHAIN_APPROX_NONE - translate all the points from the chain code into points; 
    572         /// * CV_CHAIN_APPROX_SIMPLE - compress horizontal, vertical, and diagonal segments, that is, the function leaves only their ending points; 
    573         /// * CV_CHAIN_APPROX_TC89_L1, 
    574         /// * CV_CHAIN_APPROX_TC89_KCOS - apply one of the flavors of Teh-Chin chain approximation algorithm. CV_LINK_RUNS - use completely different contour retrieval algorithm via linking of horizontal segments of 1’s. Only CV_RETR_LIST retrieval mode can be used with this method. </param> 
     554        /// <param name="method">Approximation method.</param> 
    575555        /// <param name="parameter">Method parameter (not used now). </param> 
    576556        /// <param name="minimal_perimeter">Approximates only those contours whose perimeters are not less than minimal_perimeter. Other chains are removed from the resulting structure. </param> 
    577         /// <param name="recursive">If not 0, the function approximates all chains that access can be obtained to from src_seq by h_next or v_next links. If 0, the single chain is approximated. </param> 
    578         /// <returns></returns> 
    579 #endif 
    580         public static CvSeq<CvPoint> ApproxChains(this CvChain<CvPoint> src_seq, CvMemStorage storage, ContourChain method, double parameter, int minimal_perimeter, int recursive) 
     557        /// <param name="recursive">If true, the function approximates all chains that access can be obtained to from src_seq by h_next or v_next links. If false, the single chain is approximated. </param> 
     558        /// <returns></returns> 
     559#endif 
     560        public static CvSeq<CvPoint> ApproxChains(this CvChain<CvPoint> src_seq, CvMemStorage storage, ContourChain method, double parameter, int minimal_perimeter, bool recursive) 
    581561        { 
    582562            if (src_seq == null) 
     
    594574                return result; 
    595575            } 
    596  
    597576        } 
    598577        #endregion 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/CvArr/CvMat.cs

    r32115 r32138  
    5252        #endregion 
    5353         
     54 
    5455        #region Initialization and Disposal 
    5556        /// <summary> 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Enum/ContourChain.cs

    r31262 r32138  
    77namespace KwsmLab.OpenCvSharp 
    88{ 
     9#if LANG_JP 
    910    /// <summary> 
    1011        /// 輪郭の近似手法 
    1112        /// </summary> 
     13#else 
     14    /// <summary> 
     15    /// Approximation method (for all the modes, except CV_RETR_RUNS, which uses built-in approximation).  
     16    /// </summary> 
     17#endif 
    1218        public enum ContourChain : int 
    1319        { 
     20        #if LANG_JP 
    1421                /// <summary> 
    15         /// 最も外側の輪郭のみ抽出 [CV_CHAIN_CODE_] 
     22        /// 最も外側の輪郭のみ抽出 [CV_CHAIN_CODE] 
    1623                /// </summary> 
     24#else 
     25        /// <summary> 
     26        /// CV_CHAIN_CODE - output contours in the Freeman chain code. All other methods output polygons (sequences of vertices).  
     27        /// </summary> 
     28#endif 
    1729                Code = CvConst.CV_CHAIN_CODE_, 
     30 
     31 
     32        #if LANG_JP 
    1833                /// <summary> 
    19         /// 最も外側の輪郭のみ抽出 [CV_CHAIN_APPROX_NONE_] 
     34        /// 最も外側の輪郭のみ抽出 [CV_CHAIN_APPROX_NONE] 
    2035                /// </summary> 
     36#else 
     37        /// <summary> 
     38        /// CV_CHAIN_APPROX_NONE - translate all the points from the chain code into points;  
     39        /// </summary> 
     40#endif 
    2141        ApproxNone = CvConst.CV_CHAIN_APPROX_NONE_, 
     42 
     43 
     44        #if LANG_JP 
    2245                /// <summary> 
    23         /// 最も外側の輪郭のみ抽出 [CV_CHAIN_APPROX_SIMPLE_] 
     46        /// 最も外側の輪郭のみ抽出 [CV_CHAIN_APPROX_SIMPLE] 
    2447                /// </summary> 
     48#else 
     49        /// <summary> 
     50        /// CV_CHAIN_APPROX_SIMPLE - compress horizontal, vertical, and diagonal segments, that is, the function leaves only their ending points;  
     51        /// </summary> 
     52#endif 
    2553        ApproxSimple = CvConst.CV_CHAIN_APPROX_SIMPLE_, 
     54 
     55 
     56        #if LANG_JP 
    2657                /// <summary> 
    27         /// 最も外側の輪郭のみ抽出 [CV_CHAIN_APPROX_TC89_L1_] 
     58        /// 最も外側の輪郭のみ抽出 [CV_CHAIN_APPROX_TC89_L1] 
    2859                /// </summary> 
     60#else 
     61        /// <summary> 
     62        /// CV_CHAIN_APPROX_TC89_L1 - apply one of the flavors of Teh-Chin chain approximation algorithm.  
     63        /// </summary> 
     64#endif 
    2965        ApproxTC89L1 = CvConst.CV_CHAIN_APPROX_TC89_L1_, 
     66 
     67 
     68#if LANG_JP 
    3069                /// <summary> 
    31         /// 最も外側の輪郭のみ抽出 [CV_CHAIN_APPROX_TC89_KCOS_] 
     70        /// 最も外側の輪郭のみ抽出 [CV_CHAIN_APPROX_TC89_KCOS] 
    3271                /// </summary> 
     72#else 
     73        /// <summary> 
     74        /// V_CHAIN_APPROX_TC89_KCOS - apply one of the flavors of Teh-Chin chain approximation algorithm.  
     75        /// </summary> 
     76#endif 
    3377        ApproxTC89KCOS = CvConst.CV_CHAIN_APPROX_TC89_KCOS_, 
     78 
     79 
     80#if LANG_JP 
    3481                /// <summary> 
    35         /// 最も外側の輪郭のみ抽出 [CV_LINK_RUNS_] 
     82        /// 最も外側の輪郭のみ抽出 [CV_LINK_RUN_] 
    3683                /// </summary> 
     84#else 
     85        /// <summary> 
     86        /// CV_LINK_RUNS - use completely different contour retrieval algorithm via linking of horizontal segments of 1’s. Only CV_RETR_LIST retrieval mode can be used with this method.  
     87        /// </summary> 
     88#endif 
    3789        LinkRuns = CvConst.CV_LINK_RUNS_, 
    3890        };