Changeset 32739
- Timestamp:
- 04/23/09 09:22:47 (4 years ago)
- Location:
- lang/cpluspluscli/OpenCvSharp2/trunk
- Files:
-
- 1 added
- 10 modified
-
OpenCvSharp.Extern/CvConst.h (modified) (1 diff)
-
OpenCvSharp/OpenCvSharp.csproj (modified) (2 diffs)
-
OpenCvSharp/Src/Core/CvDll.cs (modified) (1 diff)
-
OpenCvSharp/Src/Core/Cv_A-C.cs (modified) (4 diffs)
-
OpenCvSharp/Src/Core/Cv_H-Q.cs (modified) (4 diffs)
-
OpenCvSharp/Src/Core/Cv_R-Z.cs (modified) (2 diffs)
-
OpenCvSharp/Src/CvArr/IplImage.cs (modified) (8 diffs)
-
OpenCvSharp/Src/Enum/ImageOrigin.cs (added)
-
OpenCvSharp/Src/Enum/StereoBMPreset.cs (modified) (1 diff)
-
OpenCvSharp/Src/Tool/BitmapConverter.cs (modified) (3 diffs)
-
OpenCvSharp/Src/Tool/WriteableBitmapConverter.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/CvConst.h
r32694 r32739 501 501 literal Int32 CV_WARP_FILL_OUTLIERS_ = CV_WARP_FILL_OUTLIERS; 502 502 literal Int32 CV_WARP_INVERSE_MAP_ = CV_WARP_INVERSE_MAP; 503 // IplImage 504 literal Int32 IPL_ORIGIN_TL_ = IPL_ORIGIN_TL; 505 literal Int32 IPL_ORIGIN_BL_ = IPL_ORIGIN_BL; 503 506 }; 504 507 } -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/OpenCvSharp.csproj
r32694 r32739 4 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 5 5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 6 <ProductVersion>9.0. 21022</ProductVersion>6 <ProductVersion>9.0.30729</ProductVersion> 7 7 <SchemaVersion>2.0</SchemaVersion> 8 8 <ProjectGuid>{4C2356B8-1A1E-4F92-A51C-A49CA116867F}</ProjectGuid> … … 170 170 <Compile Include="Src\Enum\PixelConnectivity.cs" /> 171 171 <Compile Include="Src\Enum\StereoRectificationFlag.cs" /> 172 <Compile Include="Src\Enum\ImageOrigin.cs" /> 172 173 <Compile Include="Src\Struct\CvCircleSegment.cs" /> 173 174 <Compile Include="Src\Struct\CvConvexityDefect.cs" /> -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/CvDll.cs
r32694 r32739 597 597 public static extern void cvInitFont(IntPtr font, FontFace font_face, double hscale, double vscale, double shear, int thickness, [MarshalAs(UnmanagedType.U4)] LineType line_type); 598 598 [DllImport(DLL_CXCORE)] 599 public static extern IntPtr cvInitImageHeader(IntPtr image, CvSize size, BitDepth depth, int channels, intorigin, int align);599 public static extern IntPtr cvInitImageHeader(IntPtr image, CvSize size, BitDepth depth, int channels, ImageOrigin origin, int align); 600 600 [DllImport(DLL_CXCORE)] 601 601 public static extern int cvInitLineIterator(IntPtr image, CvPoint pt1, CvPoint pt2, IntPtr line_iterator, [MarshalAs(UnmanagedType.I4)] PixelConnectivity connectivity, [MarshalAs(UnmanagedType.Bool)] bool left_to_right); -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_A-C.cs
r32738 r32739 4372 4372 #endregion 4373 4373 #region CreateImage 4374 #if LANG_JP 4374 4375 /// <summary> 4375 4376 /// 画像のヘッダを作成し,データ領域を確保する … … 4379 4380 /// <param name="channels">要素(ピクセル)毎のチャンネル数.1,2,3,4 のいずれか.</param> 4380 4381 /// <returns>画像ポインタ</returns> 4382 #else 4383 /// <summary> 4384 /// Creates header and allocates data 4385 /// </summary> 4386 /// <param name="size">Image width and height. </param> 4387 /// <param name="depth">Bit depth of image elements.</param> 4388 /// <param name="channels">Number of channels per element(pixel).</param> 4389 /// <returns>Reference to image header</returns> 4390 #endif 4381 4391 public static IplImage CreateImage(CvSize size, BitDepth depth, int channels) 4382 4392 { … … 4389 4399 #endregion 4390 4400 #region CreateImageHeader 4391 /// <summary> 4392 /// メモリ確保と初期化を行う 4401 #if LANG_JP 4402 /// <summary> 4403 /// メモリ確保と初期化を行い,IplImage クラスを返す 4393 4404 /// </summary> 4394 4405 /// <param name="size">画像の幅と高さ</param> … … 4396 4407 /// <param name="channels">要素(ピクセル)毎のチャンネル数.1,2,3,4 のいずれか.このチャンネルはインタリーブされる.例えば,通常のカラー画像のデータレイアウトは,b0 g0 r0 b1 g1 r1 ...となっている.</param> 4397 4408 /// <returns>画像ポインタ</returns> 4409 #else 4410 /// <summary> 4411 /// Allocates, initializes, and returns structure IplImage 4412 /// </summary> 4413 /// <param name="size">Image width and height. </param> 4414 /// <param name="depth">Image depth. </param> 4415 /// <param name="channels">Number of channels. </param> 4416 /// <returns>Reference to image header</returns> 4417 #endif 4398 4418 public static IplImage CreateImageHeader(CvSize size, BitDepth depth, int channels) 4399 4419 { -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_H-Q.cs
r32697 r32739 664 664 #endregion 665 665 #region InitImageHeader 666 #if LANG_JP 666 667 /// <summary> 667 668 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す … … 672 673 /// <param name="channels">チャンネル数</param> 673 674 /// <returns>初期化された画像ヘッダ</returns> 674 public static IplImage InitImageHeader(IplImage image, CvSize size, BitDepth depth, int channels) 675 { 676 return InitImageHeader(image, size, depth, channels, 0, 4); 677 } 675 #else 676 /// <summary> 677 /// Initializes allocated by user image header 678 /// </summary> 679 /// <param name="image">Image header to initialise. </param> 680 /// <param name="size">Image width and height. </param> 681 /// <param name="depth">Image depth. </param> 682 /// <param name="channels">Number of channels. </param> 683 /// <returns>Initialzed IplImage header</returns> 684 #endif 685 public static IplImage InitImageHeader(this IplImage image, CvSize size, BitDepth depth, int channels) 686 { 687 return InitImageHeader(image, size, depth, channels, ImageOrigin.TopLeft, 4); 688 } 689 #if LANG_JP 678 690 /// <summary> 679 691 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す … … 685 697 /// <param name="origin">初期化される画像ヘッダ</param> 686 698 /// <returns>初期化された画像ヘッダ</returns> 687 public static IplImage InitImageHeader(IplImage image, CvSize size, BitDepth depth, int channels, int origin) 699 #else 700 /// <summary> 701 /// Initializes allocated by user image header 702 /// </summary> 703 /// <param name="image">Image header to initialise. </param> 704 /// <param name="size">Image width and height. </param> 705 /// <param name="depth">Image depth. </param> 706 /// <param name="channels">Number of channels. </param> 707 /// <param name="origin">Origin of image</param> 708 /// <returns>Initialzed IplImage header</returns> 709 #endif 710 public static IplImage InitImageHeader(this IplImage image, CvSize size, BitDepth depth, int channels, ImageOrigin origin) 688 711 { 689 712 return InitImageHeader(image, size, depth, channels, origin, 4); 690 713 } 714 #if LANG_JP 691 715 /// <summary> 692 716 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す … … 699 723 /// <param name="align">画像の行のアライメント,通常は4,あるいは 8 バイト.</param> 700 724 /// <returns>初期化された画像ヘッダ</returns> 701 public static IplImage InitImageHeader(IplImage image, CvSize size, BitDepth depth, int channels, int origin, int align) 725 #else 726 /// <summary> 727 /// Initializes allocated by user image header 728 /// </summary> 729 /// <param name="image">Image header to initialise. </param> 730 /// <param name="size">Image width and height. </param> 731 /// <param name="depth">Image depth. </param> 732 /// <param name="channels">Number of channels. </param> 733 /// <param name="origin">Origin of image</param> 734 /// <param name="align">Alignment for image rows, typically 4 or 8 bytes. </param> 735 /// <returns>Initialzed IplImage header</returns> 736 #endif 737 public static IplImage InitImageHeader(this IplImage image, CvSize size, BitDepth depth, int channels, ImageOrigin origin, int align) 702 738 { 703 739 if (image == null) -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Core/Cv_R-Z.cs
r32738 r32739 773 773 #endregion 774 774 #region ReleaseImage 775 #if LANG_JP 775 776 /// <summary> 776 777 /// ヘッダと画像データを解放する 777 778 /// </summary> 778 779 /// <param name="image">確保した画像ヘッダへの参照</param> 780 #else 781 /// <summary> 782 /// Releases header and image data 783 /// </summary> 784 /// <param name="image">Reference to the header of the deallocated image. </param> 785 #endif 779 786 public static void ReleaseImage(IplImage image) 780 787 { … … 786 793 #endregion 787 794 #region ReleaseImageHeader 795 #if LANG_JP 788 796 /// <summary> 789 797 /// 画像のヘッダを解放する 790 798 /// </summary> 791 799 /// <param name="image">確保したヘッダへの参照</param> 800 #else 801 /// <summary> 802 /// Releases IplImage header 803 /// </summary> 804 /// <param name="image">Reference to the deallocated header. </param> 805 #endif 792 806 public static void ReleaseImageHeader(IplImage image) 793 807 { -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/CvArr/IplImage.cs
r32510 r32739 77 77 this.data = new Extern.WIplImage(this.ptr); 78 78 } 79 /// <summary> 80 /// 空の画像として初期化。cvCreateImage相当。 81 /// </summary> 82 /// <param name="size">サイズ</param> 83 /// <param name="depth">ビット深度</param> 84 /// <param name="channels">チャンネル数</param> 79 #if LANG_JP 80 /// <summary> 81 /// 画像のヘッダを作成し,データ領域を確保する (cvCreateImage). 82 /// </summary> 83 /// <param name="size">画像の幅と高さ</param> 84 /// <param name="depth">画像要素のビットデプス</param> 85 /// <param name="channels">要素(ピクセル)毎のチャンネル数.1,2,3,4 のいずれか.</param> 86 #else 87 /// <summary> 88 /// Creates header and allocates data (cvCreateImage). 89 /// </summary> 90 /// <param name="size">Image width and height. </param> 91 /// <param name="depth">Bit depth of image elements.</param> 92 /// <param name="channels">Number of channels per element(pixel).</param> 93 #endif 85 94 public IplImage(CvSize size, BitDepth depth, int channels) 86 95 { … … 92 101 this.data = new Extern.WIplImage(this.ptr); 93 102 } 94 /// <summary> 95 /// 空の画像として初期化。cvCreateImage相当。 96 /// </summary> 97 /// <param name="width">画像の幅</param> 98 /// <param name="height">画像の高さ</param> 99 /// <param name="depth">ビット深度</param> 100 /// <param name="channels">チャンネル数</param> 103 #if LANG_JP 104 /// <summary> 105 /// 画像のヘッダを作成し,データ領域を確保する (cvCreateImage). 106 /// </summary> 107 /// <param name="width">画像の幅</param> 108 /// <param name="height">画像の高さ</param> 109 /// <param name="depth">画像要素のビットデプス</param> 110 /// <param name="channels">要素(ピクセル)毎のチャンネル数.1,2,3,4 のいずれか.</param> 111 #else 112 /// <summary> 113 /// Creates header and allocates data (cvCreateImage). 114 /// </summary> 115 /// <param name="width">Image width. </param> 116 /// <param name="height">Image height. </param> 117 /// <param name="depth">Bit depth of image elements.</param> 118 /// <param name="channels">Number of channels per element(pixel).</param> 119 #endif 101 120 public IplImage(int width, int height, BitDepth depth, int channels) 102 121 { … … 137 156 #if LANG_JP 138 157 /// <summary> 139 /// リソースの解放140 /// </summary> 141 #else 142 /// <summary> 143 /// cvReleaseImage158 /// ヘッダと画像データを解放する (cvReleaseImage) 159 /// </summary> 160 #else 161 /// <summary> 162 /// Releases header and image data (cvReleaseImage) 144 163 /// </summary> 145 164 #endif … … 411 430 /// </summary> 412 431 #endif 413 public intOrigin414 { 415 get { return data.origin; }432 public ImageOrigin Origin 433 { 434 get { return (ImageOrigin)data.origin; } 416 435 } 417 436 #if LANG_JP … … 824 843 #endregion 825 844 #region InitHeader 826 /// <summary> 827 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す 845 #if LANG_JP 846 /// <summary> 847 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す (cvInitImageHeader). 828 848 /// </summary> 829 849 /// <param name="size">画像の幅と高さ</param> … … 831 851 /// <param name="channels">チャンネル数</param> 832 852 /// <returns>初期化された画像ヘッダ</returns> 853 #else 854 /// <summary> 855 /// Initializes allocated by user image header (cvInitImageHeader). 856 /// </summary> 857 /// <param name="size">Image width and height. </param> 858 /// <param name="depth">Image depth. </param> 859 /// <param name="channels">Number of channels. </param> 860 /// <returns>Initialzed IplImage header</returns> 861 #endif 833 862 public IplImage InitHeader(CvSize size, BitDepth depth, int channels) 834 863 { 835 864 return Cv.InitImageHeader(this, size, depth, channels); 836 865 } 837 /// <summary> 838 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す 866 #if LANG_JP 867 /// <summary> 868 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す (cvInitImageHeader). 839 869 /// </summary> 840 870 /// <param name="size">画像の幅と高さ</param> … … 843 873 /// <param name="origin">初期化される画像ヘッダ</param> 844 874 /// <returns>初期化された画像ヘッダ</returns> 845 public IplImage InitHeader(CvSize size, BitDepth depth, int channels, int origin) 875 #else 876 /// <summary> 877 /// Initializes allocated by user image header (cvInitImageHeader). 878 /// </summary> 879 /// <param name="size">Image width and height. </param> 880 /// <param name="depth">Image depth. </param> 881 /// <param name="channels">Number of channels. </param> 882 /// <param name="origin">Origin of image</param> 883 /// <returns>Initialzed IplImage header</returns> 884 #endif 885 public IplImage InitHeader(CvSize size, BitDepth depth, int channels, ImageOrigin origin) 846 886 { 847 887 return Cv.InitImageHeader(this, size, depth, channels, origin); 848 888 } 849 /// <summary> 850 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す 889 #if LANG_JP 890 /// <summary> 891 /// ユーザから渡された参照が指す, ユーザによって確保された画像のヘッダ構造体を初期化し,その参照を返す (cvInitImageHeader). 851 892 /// </summary> 852 893 /// <param name="size">画像の幅と高さ</param> … … 856 897 /// <param name="align">画像の行のアライメント,通常は4,あるいは 8 バイト.</param> 857 898 /// <returns>初期化された画像ヘッダ</returns> 858 public IplImage InitHeader(CvSize size, BitDepth depth, int channels, int origin, int align) 899 #else 900 /// <summary> 901 /// Initializes allocated by user image header (cvInitImageHeader). 902 /// </summary> 903 /// <param name="size">Image width and height. </param> 904 /// <param name="depth">Image depth. </param> 905 /// <param name="channels">Number of channels. </param> 906 /// <param name="origin">Origin of image</param> 907 /// <param name="align">Alignment for image rows, typically 4 or 8 bytes. </param> 908 /// <returns>Initialzed IplImage header</returns> 909 #endif 910 public IplImage InitHeader(CvSize size, BitDepth depth, int channels, ImageOrigin origin, int align) 859 911 { 860 912 return Cv.InitImageHeader(this, size, depth, channels, origin, align); -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Enum/StereoBMPreset.cs
r32510 r32739 7 7 namespace KwsmLab.OpenCvSharp 8 8 { 9 #if LANG_JP 9 10 /// <summary> 10 11 /// あらかじめ定義された, CreateStereoBMStateのパラメータのID. 11 12 /// </summary> 13 #else 14 /// <summary> 15 /// ID of one of the pre-defined parameter sets for CreateStereoBMState 16 /// </summary> 17 #endif 12 18 public enum StereoBMPreset : int 13 19 { -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Tool/BitmapConverter.cs
r32510 r32739 368 368 dst.UnlockBits(bd); 369 369 // 反転対策 370 if (src.Origin == 1)370 if (src.Origin == ImageOrigin.BottomLeft) 371 371 { 372 372 dst.RotateFlip(RotateFlipType.RotateNoneFlipY); … … 416 416 } 417 417 418 FillBitmapInfo(ref bmi, bmpW, bmpH, img.Bpp, img.Origin);418 FillBitmapInfo(ref bmi, bmpW, bmpH, img.Bpp, (int)img.Origin); 419 419 420 420 Win32API.StretchDIBits( … … 457 457 Win32API.BITMAPINFO bmi = (Win32API.BITMAPINFO)Marshal.PtrToStructure(buffer, typeof(Win32API.BITMAPINFO)); 458 458 459 FillBitmapInfo(ref bmi, bmpW, bmpH, img.Bpp, img.Origin);459 FillBitmapInfo(ref bmi, bmpW, bmpH, img.Bpp, (int)img.Origin); 460 460 461 461 from_x = Math.Min(Math.Max(from_x, 0), bmpW - 1); -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Tool/WriteableBitmapConverter.cs
r32510 r32739 245 245 } 246 246 247 if (src.Origin == 1)247 if (src.Origin == ImageOrigin.BottomLeft) 248 248 { 249 249 ipl.Dispose();
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)