| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using KwsmLab.OpenCvSharp;
|
|---|
| 4 |
|
|---|
| 5 | namespace KwsmLab.OpenCvSharpSample
|
|---|
| 6 | {
|
|---|
| 7 | /// <summary>
|
|---|
| 8 | /// Constants
|
|---|
| 9 | /// </summary>
|
|---|
| 10 | static class Const
|
|---|
| 11 | {
|
|---|
| 12 | public const string IMAGE_LENNA = "Data/Image/lenna.png";
|
|---|
| 13 | public const string IMAGE_GORYOKAKU = "Data/Image/goryokaku.jpg";
|
|---|
| 14 | public const string IMAGE_MALTESE = "Data/Image/maltese.jpg";
|
|---|
| 15 | public const string IMAGE_CAKE = "Data/Image/cake.bmp";
|
|---|
| 16 | public const string IMAGE_FRUITS = "Data/Image/fruits.jpg";
|
|---|
| 17 | public const string IMAGE_PENGUIN1 = "Data/Image/penguin1.png";
|
|---|
| 18 | public const string IMAGE_PENGUIN2 = "Data/Image/penguin2.png";
|
|---|
| 19 | public const string IMAGE_DISTORTION = "Data/Image/Calibration/01.jpg";
|
|---|
| 20 | public const string IMAGE_CALIBRATION = "Data/Image/Calibration/{0:D2}.jpg";
|
|---|
| 21 | public const string IMAGE_SURF_BOX = "Data/Image/box.png";
|
|---|
| 22 | public const string IMAGE_SURF_BOXINSCENE = "Data/Image/box_in_scene.png";
|
|---|
| 23 | public const string XML_CAMERA = "Data/Xml/camera.xml";
|
|---|
| 24 | public const string XML_HAARCASCADE = "Data/Xml/haarcascade_frontalface_alt2.xml";
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | static class Program
|
|---|
| 28 | {
|
|---|
| 29 | /// <summary>
|
|---|
| 30 | /// アプリケーションのメイン エントリ ポイントです。
|
|---|
| 31 | ///
|
|---|
| 32 | /// 以下のサンプルの大多数は、OpenCV付属のサンプルやOpenCV日本語版リファレンスのサンプルから拝借しC#風に書き換えたものです。
|
|---|
| 33 | /// </summary>
|
|---|
| 34 | /// <remarks>Please uncomment some samples optionally.</remarks>
|
|---|
| 35 | [STAThread]
|
|---|
| 36 | static void Main()
|
|---|
| 37 | {
|
|---|
| 38 | // 画像のアフィン変換
|
|---|
| 39 | //Sample.Affine();
|
|---|
| 40 | // 点列を包含する矩形
|
|---|
| 41 | //Sample.BoundingRect();
|
|---|
| 42 | // カメラキャリブレーション
|
|---|
| 43 | //Sample.CalibrateCamera();
|
|---|
| 44 | // AVIファイルのキャプチャ
|
|---|
| 45 | Sample.CaptureAVI();
|
|---|
| 46 | // カメラのキャプチャ
|
|---|
| 47 | //Sample.CaptureCamera();
|
|---|
| 48 | // 輪郭領域の面積と輪郭の長さ
|
|---|
| 49 | //Sample.Contour();
|
|---|
| 50 | // System.Drawing.Bitmapへの変換
|
|---|
| 51 | //Sample.ConvertToBitmap();
|
|---|
| 52 | // System.Windows.Media.Imaging.WriteableBitmapへの変換
|
|---|
| 53 | //Sample.ConvertToWriteableBitmap();
|
|---|
| 54 | // コーナーの検出
|
|---|
| 55 | //Sample.CornerDetect();
|
|---|
| 56 | // ドロネー
|
|---|
| 57 | //Sample.Delaunay();
|
|---|
| 58 | // 離散フーリエ変換
|
|---|
| 59 | //Sample.DFT();
|
|---|
| 60 | // 距離変換とその可視化
|
|---|
| 61 | //Sample.DistTransform();
|
|---|
| 62 | // エッジ検出
|
|---|
| 63 | //Sample.Edge();
|
|---|
| 64 | // 顔の検出
|
|---|
| 65 | //Sample.FaceDetect();
|
|---|
| 66 | //データのファイルストレージへの書き込み・読み込み
|
|---|
| 67 | //Sample.FileStorage();
|
|---|
| 68 | // ヒストグラムの描画
|
|---|
| 69 | //Sample.Histogram();
|
|---|
| 70 | // ハフ変換による直線検出
|
|---|
| 71 | //Sample.HoughLines();
|
|---|
| 72 | // 不要オブジェクトの除去
|
|---|
| 73 | //Sample.Inpaint();
|
|---|
| 74 | // カルマンフィルタ
|
|---|
| 75 | //Sample.Kalman();
|
|---|
| 76 | // クラスタリングによる減色処理
|
|---|
| 77 | //Sample.KMeans();
|
|---|
| 78 | // 行列演算のテスト
|
|---|
| 79 | //Sample.MatTest();
|
|---|
| 80 | // モルフォロジー変換
|
|---|
| 81 | //Sample.Morphology();
|
|---|
| 82 | //ブロックマッチングによるオプティカルフローの計算
|
|---|
| 83 | //Sample.OpticalFlowBM();
|
|---|
| 84 | // 画像の透視投影変換
|
|---|
| 85 | Sample.Perspective();
|
|---|
| 86 | // ピクセルデータへの直接アクセス
|
|---|
| 87 | //Sample.PixelAccess();
|
|---|
| 88 | // ピクセルサンプリング
|
|---|
| 89 | //Sample.PixelSampling();
|
|---|
| 90 | // 平均値シフト法による画像のセグメント化
|
|---|
| 91 | //Sample.PyrMeanShiftFiltering();
|
|---|
| 92 | // 画像ピラミッドを用いた画像の領域分割
|
|---|
| 93 | //Sample.PyrSegmentation();
|
|---|
| 94 | // 画像のサイズ変更
|
|---|
| 95 | //Sample.Resize();
|
|---|
| 96 | // CvSeqのテスト
|
|---|
| 97 | //Sample.SeqTest();
|
|---|
| 98 | // 輪郭検出
|
|---|
| 99 | //Sample.Snake();
|
|---|
| 100 | // SURFによる対応点検出
|
|---|
| 101 | //Sample.SURF();
|
|---|
| 102 | // テキストの描画
|
|---|
| 103 | //Sample.Text();
|
|---|
| 104 | // 2値化
|
|---|
| 105 | //Sample.Threshold();
|
|---|
| 106 | // 歪み補正
|
|---|
| 107 | //Sample.Undistort();
|
|---|
| 108 | // カメラからの画像キャプチャ
|
|---|
| 109 | //Sample.VideoWriter();
|
|---|
| 110 | // Watershedアルゴリズムによる画像の領域分割
|
|---|
| 111 | //Sample.Watershed();
|
|---|
| 112 | }
|
|---|
| 113 |
|
|---|
| 114 | }
|
|---|
| 115 | }
|
|---|