Changeset 30779
- Timestamp:
- 03/04/09 08:56:04 (4 years ago)
- Location:
- lang/cpluspluscli/OpenCvSharp/sample
- Files:
-
- 3 modified
-
OpenCvSharpSample.sln (modified) (2 diffs)
-
OpenCvSharpSample/OpenCvSharpSample.csproj (modified) (1 diff)
-
OpenCvSharpSample/Sample/StereoCorrespondence.cs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/cpluspluscli/OpenCvSharp/sample/OpenCvSharpSample.sln
r30663 r30779 7 7 EndProject 8 8 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenCvSharp.MachineLearning", "..\OpenCvSharp(CodeRepos)\OpenCvSharp.MachineLearning\OpenCvSharp.MachineLearning.vcproj", "{A23A01C9-C302-41B7-8D94-50BDD340C68E}" 9 EndProject 10 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenCvSharp.Auxiliary", "..\OpenCvSharp(CodeRepos)\OpenCvSharp.Auxiliary\OpenCvSharp.Auxiliary.csproj", "{EB6341C6-4FBC-4D48-9D09-617F2612AD8B}" 9 11 EndProject 10 12 Global … … 48 50 {A23A01C9-C302-41B7-8D94-50BDD340C68E}.Release|Win32.ActiveCfg = Release|Win32 49 51 {A23A01C9-C302-41B7-8D94-50BDD340C68E}.Release|Win32.Build.0 = Release|Win32 52 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 53 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Debug|Any CPU.Build.0 = Debug|Any CPU 54 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 55 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 56 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Debug|Win32.ActiveCfg = Debug|Any CPU 57 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Release|Any CPU.ActiveCfg = Release|Any CPU 58 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Release|Any CPU.Build.0 = Release|Any CPU 59 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 60 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Release|Mixed Platforms.Build.0 = Release|Any CPU 61 {EB6341C6-4FBC-4D48-9D09-617F2612AD8B}.Release|Win32.ActiveCfg = Release|Any CPU 50 62 EndGlobalSection 51 63 GlobalSection(SolutionProperties) = preSolution -
lang/cpluspluscli/OpenCvSharp/sample/OpenCvSharpSample/OpenCvSharpSample.csproj
r30663 r30779 193 193 </ItemGroup> 194 194 <ItemGroup> 195 <ProjectReference Include="..\..\OpenCvSharp%28CodeRepos%29\OpenCvSharp.Auxiliary\OpenCvSharp.Auxiliary.csproj"> 196 <Project>{EB6341C6-4FBC-4D48-9D09-617F2612AD8B}</Project> 197 <Name>OpenCvSharp.Auxiliary</Name> 198 </ProjectReference> 195 199 <ProjectReference Include="..\..\OpenCvSharp%28CodeRepos%29\OpenCvSharp.MachineLearning\OpenCvSharp.MachineLearning.vcproj"> 196 200 <Project>{A23A01C9-C302-41B7-8D94-50BDD340C68E}</Project> -
lang/cpluspluscli/OpenCvSharp/sample/OpenCvSharpSample/Sample/StereoCorrespondence.cs
r30663 r30779 4 4 using System.Text; 5 5 using KwsmLab.OpenCvSharp; 6 using KwsmLab.OpenCvSharp.Auxiliary; 6 7 7 8 namespace KwsmLab.OpenCvSharpSample … … 20 21 // ブロックマッチング, グラフカットの両アルゴリズムによるステレオマッチング 21 22 23 /*using (IplImage src = new IplImage(Const.IMAGE_TSUKUBA_RIGHT, LoadMode.GrayScale)) 24 using (IplImage dst = src.Clone()) 25 { 26 KwsmLab.OpenCvSharp.Auxiliary.CvAux.DeleteMoire(dst); 27 using (CvWindow w1 = new CvWindow("1", src)) 28 using (CvWindow w2 = new CvWindow("2", dst)) 29 { 30 CV.WaitKey(); 31 } 32 }*/ 33 22 34 // 入力画像の読み込み 23 35 using (IplImage imgLeft = new IplImage(Const.IMAGE_TSUKUBA_LEFT, LoadMode.GrayScale)) … … 30 42 using (IplImage dstBM = new IplImage(imgLeft.Size, BitDepth.U8, 1)) 31 43 using (IplImage dstGC = new IplImage(imgLeft.Size, BitDepth.U8, 1)) 44 using (IplImage dstAux = new IplImage(imgLeft.Size, BitDepth.U8, 1)) 32 45 { 33 46 // 距離計測とスケーリング … … 37 50 CV.FindStereoCorrespondenceBM(imgLeft, imgRight, dispBM, stateBM); // stateBM.FindStereoCorrespondence(imgLeft, imgRight, dispBM); 38 51 CV.FindStereoCorrespondenceGC(imgLeft, imgRight, dispLeft, dispRight, stateGC, false); // stateGC.FindStereoCorrespondence(imgLeft, imgRight, dispLeft, dispRight, false); 39 52 CvAux.FindStereoCorrespondence(imgLeft, imgRight, DisparityMode.Birchfield, dstAux, 50, 25, 5, 12, 15, 25); 53 40 54 CV.ConvertScale(dispBM, dstBM, 1); 41 55 CV.ConvertScale(dispLeft, dstGC, -16); 56 CV.ConvertScale(dstAux, dstAux, 16); 42 57 43 using (CvWindow windowBM = new CvWindow("Stereo Correspondence BM", dstBM)) 44 using (CvWindow windowGC = new CvWindow("Stereo Correspondence GC", dstGC)) 58 using (CvWindow windowBM = new CvWindow("Stereo Correspondence (BM)", dstBM)) 59 using (CvWindow windowGC = new CvWindow("Stereo Correspondence (GC)", dstGC)) 60 using (CvWindow windowAux = new CvWindow("Stereo Correspondence (cvaux)", dstAux)) 45 61 { 46 62 CV.WaitKey();
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)