Changeset 32750 for lang/cpluspluscli
- Timestamp:
- 04/23/09 15:16:19 (4 years ago)
- Location:
- lang/cpluspluscli/OpenCvSharp2/trunk
- Files:
-
- 6 added
- 4 removed
- 8 modified
-
OpenCvSharp.MachineLearning/CvSVM.h (modified) (1 diff)
-
OpenCvSharp.Test/Samples/EM.cs (modified) (2 diffs)
-
OpenCvSharp.Test/Samples/Kalman.cs (modified) (1 diff)
-
OpenCvSharp/OpenCvSharp.csproj (modified) (3 diffs)
-
OpenCvSharp/Src/Class/CvHaarClassifier.cs (modified) (4 diffs)
-
OpenCvSharp/Src/CvArr/CvMat.cs (modified) (8 diffs)
-
OpenCvSharp/Src/CvArr/CvMatND.cs (modified) (22 diffs)
-
OpenCvSharp/Src/CvArr/IplImage.cs (modified) (1 diff)
-
OpenCvSharp/Src/Tool/PointerAccessor/1 (deleted)
-
OpenCvSharp/Src/Tool/PointerAccessor/2 (deleted)
-
OpenCvSharp/Src/Tool/PointerAccessor/IPointerAccessor.cs (added)
-
OpenCvSharp/Src/Tool/PointerAccessor/IPointerAccessor1.cs (deleted)
-
OpenCvSharp/Src/Tool/PointerAccessor/IPointerAccessor2.cs (deleted)
-
OpenCvSharp/Src/Tool/PointerAccessor/PointerAccessor.Byte.cs (added)
-
OpenCvSharp/Src/Tool/PointerAccessor/PointerAccessor.Double.cs (added)
-
OpenCvSharp/Src/Tool/PointerAccessor/PointerAccessor.Int16.cs (added)
-
OpenCvSharp/Src/Tool/PointerAccessor/PointerAccessor.Int32.cs (added)
-
OpenCvSharp/Src/Tool/PointerAccessor/PointerAccessor.Single.cs (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.MachineLearning/CvSVM.h
r32586 r32750 139 139 /// <param name="i"></param> 140 140 /// <returns></returns> 141 PointerAccessor:: Float1^ GetSupportVector(Int32 i)142 { 143 return gcnew PointerAccessor:: Float1(const_cast<float*>(_ptr->get_support_vector(i)));141 PointerAccessor::Single^ GetSupportVector(Int32 i) 142 { 143 return gcnew PointerAccessor::Single(const_cast<float*>(_ptr->get_support_vector(i))); 144 144 } 145 145 /// <summary> -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Test/Samples/EM.cs
r32568 r32750 68 68 { 69 69 CvPoint pt = new CvPoint(j, i); 70 sample.DataArray Float[0] = (float)j;71 sample.DataArray Float[1] = (float)i;70 sample.DataArraySingle[0] = (float)j; 71 sample.DataArraySingle[1] = (float)i; 72 72 int response = Cv.Round(em.Predict(sample, null)); 73 73 CvColor c = COLORS[response % COLORS.Length]; … … 83 83 CvPoint pt = new CvPoint() 84 84 { 85 X = Cv.Round(samples.DataArray Float[i * 2]),86 Y = Cv.Round(samples.DataArray Float[i * 2 + 1])85 X = Cv.Round(samples.DataArraySingle[i * 2]), 86 Y = Cv.Round(samples.DataArraySingle[i * 2 + 1]) 87 87 }; 88 img.Circle(pt, 1, COLORS[labels.DataArrayInt [i] % COLORS.Length], Cv.FILLED);88 img.Circle(pt, 1, COLORS[labels.DataArrayInt32[i] % COLORS.Length], Cv.FILLED); 89 89 } 90 90 -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Test/Samples/Kalman.cs
r32623 r32750 64 64 Cv.MatMulAdd(kalman.MeasurementMatrix, state, measurement, measurement); 65 65 66 float measurement_angle = measurement.DataArray Float[0];66 float measurement_angle = measurement.DataArraySingle[0]; 67 67 CvPoint measurement_pt = CalcPoint(img, measurement_angle); 68 68 -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/OpenCvSharp.csproj
r32739 r32750 4 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 5 5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 6 <ProductVersion>9.0. 30729</ProductVersion>6 <ProductVersion>9.0.21022</ProductVersion> 7 7 <SchemaVersion>2.0</SchemaVersion> 8 8 <ProjectGuid>{4C2356B8-1A1E-4F92-A51C-A49CA116867F}</ProjectGuid> … … 290 290 <Compile Include="Src\Struct\CvLineSegmentPoint.cs" /> 291 291 <Compile Include="Src\Tool\Pointer.cs" /> 292 <Compile Include="Src\Tool\PointerAccessor\IPointerAccessor2.cs" />293 292 <Compile Include="Src\Tool\TimeMeasurer.cs" /> 294 293 <Compile Include="Src\Tool\StructurePointer.cs" /> … … 310 309 <Compile Include="Src\Struct\CvScalar.cs" /> 311 310 <Compile Include="Src\Struct\CvSize.cs" /> 312 <Compile Include="Src\Tool\PointerAccessor\2\Byte2.cs" /> 313 <Compile Include="Src\Tool\PointerAccessor\IPointerAccessor1.cs" /> 311 <Compile Include="Src\Tool\PointerAccessor\IPointerAccessor.cs" /> 314 312 <Compile Include="Src\Tool\ScopedGCHandle.cs" /> 315 313 <Compile Include="Src\Tool\Win32API.cs" /> 316 314 <Compile Include="Src\Tool\WriteableBitmapConverter.cs" /> 317 <Compile Include="Src\Tool\PointerAccessor\ 1\Byte1.cs" />318 <Compile Include="Src\Tool\PointerAccessor\ 1\Short1.cs" />319 <Compile Include="Src\Tool\PointerAccessor\ 1\Int1.cs" />320 <Compile Include="Src\Tool\PointerAccessor\ 1\Single1.cs" />321 <Compile Include="Src\Tool\PointerAccessor\ 1\Double1.cs" />315 <Compile Include="Src\Tool\PointerAccessor\PointerAccessor.Byte.cs" /> 316 <Compile Include="Src\Tool\PointerAccessor\PointerAccessor.Int16.cs" /> 317 <Compile Include="Src\Tool\PointerAccessor\PointerAccessor.Int32.cs" /> 318 <Compile Include="Src\Tool\PointerAccessor\PointerAccessor.Single.cs" /> 319 <Compile Include="Src\Tool\PointerAccessor\PointerAccessor.Double.cs" /> 322 320 </ItemGroup> 323 321 <ItemGroup> -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/Class/CvHaarClassifier.cs
r32689 r32750 116 116 /// </summary> 117 117 #endif 118 public PointerAccessor. Float1Threshold118 public PointerAccessor.Single Threshold 119 119 { 120 get { unsafe { return new PointerAccessor. Float1(_data.threshold); } }120 get { unsafe { return new PointerAccessor.Single(_data.threshold); } } 121 121 } 122 122 … … 130 130 /// </summary> 131 131 #endif 132 public PointerAccessor.Int 1Left132 public PointerAccessor.Int32 Left 133 133 { 134 get { unsafe { return new PointerAccessor.Int 1(_data.left); } }134 get { unsafe { return new PointerAccessor.Int32(_data.left); } } 135 135 } 136 136 … … 144 144 /// </summary> 145 145 #endif 146 public PointerAccessor.Int 1Right146 public PointerAccessor.Int32 Right 147 147 { 148 get { unsafe { return new PointerAccessor.Int 1(_data.right); } }148 get { unsafe { return new PointerAccessor.Int32(_data.right); } } 149 149 } 150 150 … … 158 158 /// </summary> 159 159 #endif 160 public PointerAccessor. Float1Alpha160 public PointerAccessor.Single Alpha 161 161 { 162 get { unsafe { return new PointerAccessor. Float1(_data.alpha); } }162 get { unsafe { return new PointerAccessor.Single(_data.alpha); } } 163 163 } 164 164 #endregion -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/CvArr/CvMat.cs
r32749 r32750 33 33 /// 34 34 /// </summary> 35 private PointerAccessor.Byte 1dataArrayByte;35 private PointerAccessor.Byte dataArrayByte; 36 36 /// <summary> 37 37 /// 38 38 /// </summary> 39 private PointerAccessor. Short1 dataArrayShort;39 private PointerAccessor.Int16 dataArrayInt16; 40 40 /// <summary> 41 41 /// 42 42 /// </summary> 43 private PointerAccessor.Int 1 dataArrayInt;43 private PointerAccessor.Int32 dataArrayInt32; 44 44 /// <summary> 45 45 /// 46 46 /// </summary> 47 private PointerAccessor. Float1 dataArrayFloat;47 private PointerAccessor.Single dataArraySingle; 48 48 /// <summary> 49 49 /// 50 50 /// </summary> 51 private PointerAccessor.Double 1dataArrayDouble;51 private PointerAccessor.Double dataArrayDouble; 52 52 #endregion 53 53 … … 630 630 /// </summary> 631 631 #endif 632 public PointerAccessor.Byte 1DataArrayByte632 public PointerAccessor.Byte DataArrayByte 633 633 { 634 634 get … … 638 638 unsafe 639 639 { 640 dataArrayByte = new PointerAccessor.Byte 1(_data.data_ptr);640 dataArrayByte = new PointerAccessor.Byte(_data.data_ptr); 641 641 } 642 642 } … … 653 653 /// </summary> 654 654 #endif 655 public PointerAccessor. Short1 DataArrayShort655 public PointerAccessor.Int16 DataArrayInt16 656 656 { 657 657 get 658 658 { 659 if (dataArray Short== null)659 if (dataArrayInt16 == null) 660 660 { 661 661 unsafe 662 662 { 663 dataArray Short = new PointerAccessor.Short1(_data.data_s);663 dataArrayInt16 = new PointerAccessor.Int16(_data.data_s); 664 664 } 665 665 } 666 return dataArray Short;666 return dataArrayInt16; 667 667 } 668 668 } … … 676 676 /// </summary> 677 677 #endif 678 public PointerAccessor.Int 1 DataArrayInt678 public PointerAccessor.Int32 DataArrayInt32 679 679 { 680 680 get 681 681 { 682 if (dataArrayInt == null)682 if (dataArrayInt32 == null) 683 683 { 684 684 unsafe 685 685 { 686 dataArrayInt = new PointerAccessor.Int1(_data.data_i);686 dataArrayInt32 = new PointerAccessor.Int32(_data.data_i); 687 687 } 688 688 } 689 return dataArrayInt ;689 return dataArrayInt32; 690 690 } 691 691 } … … 699 699 /// </summary> 700 700 #endif 701 public PointerAccessor. Float1 DataArrayFloat701 public PointerAccessor.Single DataArraySingle 702 702 { 703 703 get 704 704 { 705 if (dataArray Float== null)705 if (dataArraySingle == null) 706 706 { 707 707 unsafe 708 708 { 709 dataArray Float = new PointerAccessor.Float1(_data.data_fl);709 dataArraySingle = new PointerAccessor.Single(_data.data_fl); 710 710 } 711 711 } 712 return dataArray Float;712 return dataArraySingle; 713 713 } 714 714 } … … 722 722 /// </summary> 723 723 #endif 724 public PointerAccessor.Double 1DataArrayDouble724 public PointerAccessor.Double DataArrayDouble 725 725 { 726 726 get … … 730 730 unsafe 731 731 { 732 dataArrayDouble = new PointerAccessor.Double 1(_data.data_db);732 dataArrayDouble = new PointerAccessor.Double(_data.data_db); 733 733 } 734 734 } -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/CvArr/CvMatND.cs
r32510 r32750 28 28 /// C++/CLI wrapper in order to access a native structure 29 29 /// </summary> 30 private Extern.WCvMatND data;30 private Extern.WCvMatND _data; 31 31 /// <summary> 32 32 /// Data pointer 33 33 /// </summary> 34 private IntPtr ptr;34 private IntPtr _ptr; 35 35 /// <summary> 36 36 /// 37 37 /// </summary> 38 private PointerAccessor.Byte 1dataArrayByte;38 private PointerAccessor.Byte dataArrayByte; 39 39 /// <summary> 40 40 /// 41 41 /// </summary> 42 private PointerAccessor. Short1 dataArrayShort;42 private PointerAccessor.Int16 dataArrayInt16; 43 43 /// <summary> 44 44 /// 45 45 /// </summary> 46 private PointerAccessor.Int 1 dataArrayInt;46 private PointerAccessor.Int32 dataArrayInt32; 47 47 /// <summary> 48 48 /// 49 49 /// </summary> 50 private PointerAccessor. Float1 dataArrayFloat;50 private PointerAccessor.Single dataArraySingle; 51 51 /// <summary> 52 52 /// 53 53 /// </summary> 54 private PointerAccessor.Double 1dataArrayDouble;54 private PointerAccessor.Double dataArrayDouble; 55 55 #endregion 56 56 … … 80 80 throw new ArgumentNullException("sizes"); 81 81 } 82 this. ptr = CvDll.cvCreateMatND(dims, sizes, type);83 if (this. ptr == IntPtr.Zero)82 this._ptr = CvDll.cvCreateMatND(dims, sizes, type); 83 if (this._ptr == IntPtr.Zero) 84 84 { 85 85 throw new OpenCvSharpException("Failed to create CvMat"); 86 86 } 87 this. data = new Extern.WCvMatND(this.ptr);87 this._data = new Extern.WCvMatND(this._ptr); 88 88 base.NotifyMemoryPressure(SizeOf); 89 89 } … … 137 137 : base(isEnabledDispose) 138 138 { 139 this. ptr = ptr;140 this. data = new Extern.WCvMatND(ptr);139 this._ptr = ptr; 140 this._data = new Extern.WCvMatND(ptr); 141 141 base.NotifyMemoryPressure(SizeOf); 142 142 } … … 154 154 : base(isEnabledDispose) 155 155 { 156 this. ptr = base.AllocMemory(SizeOf);157 this. data = new Extern.WCvMatND(ptr);156 this._ptr = base.AllocMemory(SizeOf); 157 this._data = new Extern.WCvMatND(this._ptr); 158 158 base.NotifyMemoryPressure(SizeOf); 159 159 } … … 172 172 if (IsEnabledDispose && !IsDisposed) 173 173 { 174 CvDll.cvReleaseMat(ref ptr);174 CvDll.cvReleaseMat(ref _ptr); 175 175 } 176 176 base.Dispose(); … … 189 189 public override IntPtr CvPtr 190 190 { 191 get { return ptr; }191 get { return _ptr; } 192 192 } 193 193 … … 203 203 new public int Dims 204 204 { 205 get { return data.dims; }205 get { return _data.dims; } 206 206 } 207 207 #if LANG_JP … … 216 216 public int Type 217 217 { 218 get { return data.type; }218 get { return _data.type; } 219 219 } 220 220 #if LANG_JP … … 232 232 { 233 233 Dimension[] result = new Dimension[CvConst.CV_MAX_DIM_]; 234 IntPtr ptr = data.dim;234 IntPtr ptr = _data.dim; 235 235 unsafe 236 236 { … … 275 275 public IntPtr Data 276 276 { 277 get { return data.data; }277 get { return _data.data; } 278 278 } 279 279 #if LANG_JP … … 288 288 public byte* DataByte 289 289 { 290 get { return data.ptr; }290 get { return _data.ptr; } 291 291 } 292 292 #if LANG_JP … … 301 301 public short* DataInt16 302 302 { 303 get { return data.s; }303 get { return _data.s; } 304 304 } 305 305 #if LANG_JP … … 314 314 public int* DataInt32 315 315 { 316 get { return data.i; }316 get { return _data.i; } 317 317 } 318 318 #if LANG_JP … … 327 327 public float* DataSingle 328 328 { 329 get { return data.fl; }329 get { return _data.fl; } 330 330 } 331 331 #if LANG_JP … … 340 340 public double* DataDouble 341 341 { 342 get { return data.db; }342 get { return _data.db; } 343 343 } 344 344 #if LANG_JP … … 351 351 /// </summary> 352 352 #endif 353 public PointerAccessor.Byte 1DataArrayByte353 public PointerAccessor.Byte DataArrayByte 354 354 { 355 355 get … … 357 357 if (dataArrayByte == null) 358 358 { 359 dataArrayByte = new PointerAccessor.Byte 1(data.ptr);359 dataArrayByte = new PointerAccessor.Byte(_data.ptr); 360 360 } 361 361 return dataArrayByte; … … 371 371 /// </summary> 372 372 #endif 373 public PointerAccessor. Short1 DataArrayShort373 public PointerAccessor.Int16 DataArrayInt16 374 374 { 375 375 get 376 376 { 377 if (dataArray Short== null)378 { 379 dataArray Short = new PointerAccessor.Short1(data.s);380 } 381 return dataArray Short;377 if (dataArrayInt16 == null) 378 { 379 dataArrayInt16 = new PointerAccessor.Int16(_data.s); 380 } 381 return dataArrayInt16; 382 382 } 383 383 } … … 391 391 /// </summary> 392 392 #endif 393 public PointerAccessor.Int 1 DataArrayInt393 public PointerAccessor.Int32 DataArrayInt32 394 394 { 395 395 get 396 396 { 397 if (dataArrayInt == null)398 { 399 dataArrayInt = new PointerAccessor.Int1(data.i);400 } 401 return dataArrayInt ;397 if (dataArrayInt32 == null) 398 { 399 dataArrayInt32 = new PointerAccessor.Int32(_data.i); 400 } 401 return dataArrayInt32; 402 402 } 403 403 } … … 411 411 /// </summary> 412 412 #endif 413 public PointerAccessor. Float1 DataArrayFloat413 public PointerAccessor.Single DataArraySingle 414 414 { 415 415 get 416 416 { 417 if (dataArray Float== null)418 { 419 dataArray Float = new PointerAccessor.Float1(data.fl);420 } 421 return dataArray Float;417 if (dataArraySingle == null) 418 { 419 dataArraySingle = new PointerAccessor.Single(_data.fl); 420 } 421 return dataArraySingle; 422 422 } 423 423 } … … 431 431 /// </summary> 432 432 #endif 433 public PointerAccessor.Double 1DataArrayDouble433 public PointerAccessor.Double DataArrayDouble 434 434 { 435 435 get … … 437 437 if (dataArrayDouble == null) 438 438 { 439 dataArrayDouble = new PointerAccessor.Double 1(data.db);439 dataArrayDouble = new PointerAccessor.Double(_data.db); 440 440 } 441 441 return dataArrayDouble; -
lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Src/CvArr/IplImage.cs
r32749 r32750 873 873 /// ROI が存在しない場合には,矩形 cvRect(0,0,image.Width,image.Height) が返される. 874 874 /// </summary> 875 /// <param name="image">画像ヘッダ</param>876 875 /// <returns>ROI</returns> 877 876 #else
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)