| Line | |
|---|
| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.Linq;
|
|---|
| 4 | using System.Text;
|
|---|
| 5 |
|
|---|
| 6 | namespace KwsmLab.OpenCvSharp
|
|---|
| 7 | {
|
|---|
| 8 | /// <summary>
|
|---|
| 9 | /// 輪郭データ
|
|---|
| 10 | /// </summary>
|
|---|
| 11 | public class CvContour : CvSeq<CvPoint>
|
|---|
| 12 | {
|
|---|
| 13 | /// <summary>
|
|---|
| 14 | /// C++/CLI側でポインタにアクセスするオブジェクト
|
|---|
| 15 | /// </summary>
|
|---|
| 16 | new private Extern.WCvContour data;
|
|---|
| 17 | /// <summary>
|
|---|
| 18 | /// データポインタ
|
|---|
| 19 | /// </summary>
|
|---|
| 20 | new private IntPtr ptr;
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | #region 初期化と解放
|
|---|
| 24 | /// <summary>
|
|---|
| 25 | /// ポインタから初期化
|
|---|
| 26 | /// </summary>
|
|---|
| 27 | /// <param name="ptr"></param>
|
|---|
| 28 | public CvContour(IntPtr ptr)
|
|---|
| 29 | : base(ptr)
|
|---|
| 30 | {
|
|---|
| 31 | this.ptr = ptr;
|
|---|
| 32 | this.data = new Extern.WCvContour(ptr);
|
|---|
| 33 | }
|
|---|
| 34 | /// <summary>
|
|---|
| 35 | /// リソースの解放
|
|---|
| 36 | /// </summary>
|
|---|
| 37 | public override void Dispose()
|
|---|
| 38 | {
|
|---|
| 39 | // CvContourは解放しない
|
|---|
| 40 | base.Dispose();
|
|---|
| 41 | }
|
|---|
| 42 | #endregion
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 | #region プロパティ
|
|---|
| 46 | /// <summary>
|
|---|
| 47 | /// sizeof(CvMat) を取得する
|
|---|
| 48 | /// </summary>
|
|---|
| 49 | new public const Int32 SizeOf = Extern.WCvContour.SizeOf;
|
|---|
| 50 | /// <summary>
|
|---|
| 51 | /// データポインタ(CvContour*)を取得する
|
|---|
| 52 | /// </summary>
|
|---|
| 53 | public override IntPtr CvPtr
|
|---|
| 54 | {
|
|---|
| 55 | get { return ptr; }
|
|---|
| 56 | }
|
|---|
| 57 |
|
|---|
| 58 | /// <summary>
|
|---|
| 59 | ///
|
|---|
| 60 | /// </summary>
|
|---|
| 61 | public CvRect Rect
|
|---|
| 62 | {
|
|---|
| 63 | get { return data.rect; }
|
|---|
| 64 | }
|
|---|
| 65 | /// <summary>
|
|---|
| 66 | ///
|
|---|
| 67 | /// </summary>
|
|---|
| 68 | public int Color
|
|---|
| 69 | {
|
|---|
| 70 | get { return data.color; }
|
|---|
| 71 | }
|
|---|
| 72 | #endregion
|
|---|
| 73 | }
|
|---|
| 74 | }
|
|---|